Pretty-print an Avro schema JSON document and catch an invalid top-level type.
The frame below runs the same code as this page, in the reader's own browser. Nothing is sent to us, and nothing is sent to you.
Pick a dark background and the text and panels follow it, so the frame stays readable on a dark page.
The input is parsed as JSON, the top-level value must be an object, its type is checked against Avro primitive and complex names, and two-space JSON indentation is emitted. Nested field rules remain visible for full schema review.
{"type":"record","name":"User","fields":[{"name":"id","type":"int"},{"name":"name","type":"string"}]}
{
"type": "record",
"name": "User",
"fields": [
{
"name": "id",
"type": "int"
},
{
"name": "name",
"type": "string"
}
]
}
Schema registry reviews, Spark or Hadoop data files, and compatibility checks format Avro definitions.