Class SimpleJsonEncoder
- java.lang.Object
-
- de.siegmar.logbackawslogsjsonencoder.SimpleJsonEncoder
-
public class SimpleJsonEncoder extends java.lang.ObjectSimple JSON encoder with very basic functionality that is required by this library.
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description SimpleJsonEncoderappend(java.lang.String key, java.lang.Object value)Append field to this JSON object.SimpleJsonEncoderappendObject(java.lang.String key, java.util.function.Consumer<SimpleJsonEncoder> consumer)Append object to this JSON object.
-
-
-
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 addvalue- 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 addconsumer- a consumer to thisSimpleJsonEncoderto add JSON body- Returns:
- A reference to this
SimpleJsonEncoder
-
-