Package io.avaje.json.stream.core
Class JsonStreamBuilder
java.lang.Object
io.avaje.json.stream.core.JsonStreamBuilder
- All Implemented Interfaces:
JsonStream.Builder
Used to build the default JsonStream implementation with custom settings.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbufferRecycling(BufferRecycleStrategy strategy) Determines how byte buffers are recycledbuild()Build and return the JsonStream.failOnNullPrimitives(boolean failOnNullPrimitives) Set to true to fail on NULL for primitive types.failOnUnknown(boolean failOnUnknown) Set to true to fail on unknown properties.serializeEmpty(boolean serializeEmpty) Set to true to serialize empty collections.serializeNulls(boolean serializeNulls) Set to true to serialize nulls.
-
Constructor Details
-
JsonStreamBuilder
public JsonStreamBuilder()
-
-
Method Details
-
serializeNulls
Set to true to serialize nulls. Defaults to false.- Specified by:
serializeNullsin interfaceJsonStream.Builder
-
serializeEmpty
Set to true to serialize empty collections. Defaults to false.- Specified by:
serializeEmptyin interfaceJsonStream.Builder
-
failOnUnknown
Set to true to fail on unknown properties. Defaults to false.- Specified by:
failOnUnknownin interfaceJsonStream.Builder
-
failOnNullPrimitives
Description copied from interface:JsonStream.BuilderSet to true to fail on NULL for primitive types. Defaults to false.- Specified by:
failOnNullPrimitivesin interfaceJsonStream.Builder
-
bufferRecycling
Determines how byte buffers are recycled- Specified by:
bufferRecyclingin interfaceJsonStream.Builder
-
build
Build and return the JsonStream.- Specified by:
buildin interfaceJsonStream.Builder
-