Class SimpleJsonEncoder


  • public class SimpleJsonEncoder
    extends java.lang.Object
    Simple JSON encoder with very basic functionality that is required by this library.
    • Method Detail

      • append

        public SimpleJsonEncoder append​(java.lang.String key,
                                        java.lang.Object value)
        Append field to this JSON object.
        Parameters:
        key - the key of the JSON element to add
        value - the value of the JSON element to add
        Returns:
        this
      • appendObject

        public SimpleJsonEncoder appendObject​(java.lang.String key,
                                              java.util.function.Consumer<SimpleJsonEncoder> consumer)
        Append object to this JSON object.
        Parameters:
        key - the key of the JSON element to add
        consumer - a consumer to this SimpleJsonEncoder to add JSON body
        Returns:
        A reference to this SimpleJsonEncoder