Home | About | Sematext search-lucene.com search-hadoop.com
 Search Hadoop and all its subprojects:

Switch to Plain View
Avro, mail # user - Experiment: a JSON Schema describing Avro schemas


+
Francis Galiegue 2013-02-22, 21:45
Copy link to this message
-
Re: Experiment: a JSON Schema describing Avro schemas
Doug Cutting 2013-02-22, 22:01
A few quick comments:
 - properties besides those mentioned in the spec are permitted as
metadata, e.g., {"type":"int", "java":"short"}.
 - a name can be prefixed by a namespace, e.g., {"type":"record",
"name":"foo.Bar"}
 - a schema can be the name of a schema defined earlier, e.g.
{"type":"record", "name":"List", "fields":[{"name":"next",
"type":[null, "List"]}]}

Doug

On Fri, Feb 22, 2013 at 1:45 PM, Francis Galiegue <[EMAIL PROTECTED]> wrote:
> Hello,
>
> I have written a JSON Schema describing Avro schemas (in their JSON
> form), at least to the best of my knowledge -- that is, I read the
> spec, adapted, injected some sample data, and until now it seems to
> work:
>
> https://github.com/fge/sample-json-schemas/blob/master/avro/avro-schema.json
>
> Note that this is a structural description only, as such it won't
> express constraints such as "this or that namespace must exist" etc.
>
> Comments welcome! In particular data that is failing and why -- I
> could not find much data so far...
>
> Have fun,
> --
> Francis Galiegue, [EMAIL PROTECTED]
> Try out your JSON Schemas: http://json-schema-validator.herokuapp.com
+
Francis Galiegue 2013-02-22, 22:04
+
Doug Cutting 2013-02-22, 22:12
+
Francis Galiegue 2013-02-22, 22:24
+
Francis Galiegue 2013-02-23, 01:44