JsonWriter (AWS SDK for Java
Publish date: 2024-05-04
JsonWriter (AWS SDK for Java - 2.25.34) All Implemented Interfaces: AutoCloseable
, SdkAutoCloseable
Thin wrapper around Jackson's JSON generator.
Method Details
create
builder
writeStartArray
writeEndArray
writeNull
writeStartObject
writeEndObject
writeFieldName
writeValue
writeValue
writeValue
writeValue
writeValue
writeValue
writeValue
writeValue
writeValue
writeValue
writeValue
writeNumber
close
public void close()
Closes the generator and flushes to write. Must be called when finished writing JSON content.
Specified by:close
in interfaceAutoCloseable
Specified by:close
in interfaceSdkAutoCloseable
getBytes
public byte[] getBytes()
Get the JSON content as a UTF-8 encoded byte array. It is recommended to hold onto the array reference rather then making repeated calls to this method as a new array will be created each time.
Returns: Array of UTF-8 encoded bytes that make up the generated JSON.
ncG1vNJzZmirlKB7ornAs6anmaeoe6S7zGihmq6RZK6xtY6lmK2do6l8tLvFra6aqpVkrq6t2ailaJmnqMClt46pqaisn5i8rb%2BOo6qoppOkv6Z7qaymp4%2BinsGmvo2hq6ak