JsonConfigReader

Reads the compatibility-bearing settings straight off a user's real Json instance (Json.configuration) into a SnapshotConfig (design §6).

This is a correctness requirement, not a convenience: namingStrategy, classDiscriminator, classDiscriminatorMode, ignoreUnknownKeys, encodeDefaults, explicitNulls, coerceInputValues, useAlternativeNames, useArrayPolymorphism, allowStructuredMapKeys, allowSpecialFloatingPointValues, and the reader-acceptance flags (isLenient, decodeEnumsCaseInsensitive, allowTrailingComma, allowComments) all change the wire shape or decode behavior, so re-declaring them by hand would silently drift from what the app actually does. (prettyPrint/prettyPrintIndent only change whitespace, so they are not captured.)

Functions

Link copied to clipboard
fun read(json: Json): SnapshotConfig

Projects json's configuration into the snapshot's SnapshotConfig.