ConfigBuilder

Type-safe builder to configure the parameters of a custom Json5 instance.

Constructors

Link copied to clipboard
constructor()

Properties

Link copied to clipboard

Class discriminator to use for the serialization and deserialization of polymorphic types. This setting defaults to type and can be overwritten on a per-class basis using the ClassDiscriminator annotation.

Link copied to clipboard

Encode default values from the data model when the object hierarchy to serialize does not overwrite them.

Link copied to clipboard

Number of spaces to use for indenting each hierarchy level (objects/arrays) in generated JSON5 output. This setting has an effect only if the prettyPrint option is activated.

Link copied to clipboard

Request the generation of human-readable output (spanning multiple lines). Without this option, compressed single-line output is generated. SerialComment annotations are ignored without this setting.

Link copied to clipboard

Request names of serialized object members to be quoted even if the quotation marks could be dropped. This setting has an effect only if the prettyPrint option is activated. If compressed single-line output is generated, member names will be quoted only when necessary.

Link copied to clipboard

Supply a custom SerializersModule that will be passed to the kotlinx.serialization framework.

Link copied to clipboard

Use single quotes instead of double quotes when serializing strings and member names in human-readable output. This setting has an effect only if the prettyPrint option is activated. If compressed single-line output is generated, double quotes will be used.