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:
serializeNulls
in interfaceJsonStream.Builder
-
serializeEmpty
Set to true to serialize empty collections. Defaults to false.- Specified by:
serializeEmpty
in interfaceJsonStream.Builder
-
failOnUnknown
Set to true to fail on unknown properties. Defaults to false.- Specified by:
failOnUnknown
in interfaceJsonStream.Builder
-
failOnNullPrimitives
Description copied from interface:JsonStream.Builder
Set to true to fail on NULL for primitive types. Defaults to false.- Specified by:
failOnNullPrimitives
in interfaceJsonStream.Builder
-
bufferRecycling
Determines how byte buffers are recycled- Specified by:
bufferRecycling
in interfaceJsonStream.Builder
-
build
Build and return the JsonStream.- Specified by:
build
in interfaceJsonStream.Builder
-