tjconvbuilder.md 1.3 KB


id: tjconvbuilder title: TJConvBuilder

sidebar_label: TJConvBuilder

Creates an instance of TJConv with custom settings.

Methods

Method Build:TJConv()

Builds the TJConv instance.


Method WithEmptyArrays:TJConvBuilder()

Null/Empty array fields will be output to JSON as [].

The default is not to output these fields.


Method RegisterSerializer:TJConvBuilder(sourceType:String, serializer:Object)

Registers a serializer for the given source type.


Method WithBoxing:TJConvBuilder()

Registers serializers for boxed primitive numbers.

Boxed primitives allow for the provision of serializing Null primitive numbers via JSON.


Method WithPrecision:TJConvBuilder(precision:Int)

Serialization of real numbers will have a maximum precision of precision fractional digits.


Method WithIndent:TJConvBuilder(indent:Int)

Enables pretty-printing of the serialized json, using indent spaces of indentation.

The default, 0, disables pretty-printing. The maximum indent size is 31.


Method WithCompact:TJConvBuilder()

Enables compact representation, removing extra spacing.