JsonErrorReporter

class JsonErrorReporter(objectMapper: ObjectMapper = ObjectMapper().registerModule(KotlinModule.Builder().build())) : ErrorReporter

Serializes a GenerationReport to pretty-printed JSON using Jackson.

Inputs: a GenerationReport instance. Output: a JSON string; formatting order follows Jackson defaults and collection order in the report. Errors: throws a Jackson exception if serialization fails.

Constructors

Link copied to clipboard
constructor(objectMapper: ObjectMapper = ObjectMapper().registerModule(KotlinModule.Builder().build()))

Functions

Link copied to clipboard
open override fun format(report: GenerationReport): String

Formats the provided report into a string.