Table of Contents

Method ToJson

Namespace
AvroSharp.Schemas
Assembly
AvroSharp.dll

ToJson(bool)

Writes the full schema JSON, including documentation, aliases, defaults and custom properties. The compact form is the text Apache Avro Java's Schema.toString() gives for the same schema: the same attribute order, and numbers in defaults and properties printed as Java prints them.

public string ToJson(bool indented = false)

Parameters

indented bool

true to indent the output.

Returns

string

ToJson(IEnumerable<NamedSchema>, bool)

Writes the schema JSON with the named types in referencedSchemas written by name instead of defined: the form a schema registry stores for a schema with references to other subjects, like Java's Schema.toString(referencedSchemas, pretty). Types are matched by full name.

public string ToJson(IEnumerable<NamedSchema> referencedSchemas, bool indented = false)

Parameters

referencedSchemas IEnumerable<NamedSchema>

The named types that other registered schemas define.

indented bool

true to indent the output.

Returns

string