Config Builder
Type-safe builder to configure the parameters of a custom Json5 instance.
Properties
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.
Encode default values from the data model when the object hierarchy to serialize does not overwrite them.
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.
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.
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.
Supply a custom SerializersModule that will be passed to the kotlinx.serialization framework.
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.