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
+
Doug Cutting 2013-02-22, 22:01
Copy link to this message
-
Re: Experiment: a JSON Schema describing Avro schemas
Hello,

On Fri, Feb 22, 2013 at 11:01 PM, Doug Cutting <[EMAIL PROTECTED]> wrote:
> A few quick comments:
>  - properties besides those mentioned in the spec are permitted as
> metadata, e.g., {"type":"int", "java":"short"}.

By default, JSON Schema allows additional members, it will only forbid
them if additionalProperties is false (or constrain what they can be
if additionalProperties is a schema), so the question would rather be,
is there some scenarios where they are not allowed?

>  - a name can be prefixed by a namespace, e.g., {"type":"record",
> "name":"foo.Bar"}

Ah, OK. So you can have either a "full" name, a short name and a
namespace, or even a "full" name and a namespace?

>  - a schema can be the name of a schema defined earlier, e.g.
> {"type":"record", "name":"List", "fields":[{"name":"next",
> "type":[null, "List"]}]}
>

I don't believe the schema forbids that at this point but I guess I'll
have to check..

Thanks!

--
Francis Galiegue, [EMAIL PROTECTED]
Try out your JSON Schemas: http://json-schema-validator.herokuapp.com
+
Doug Cutting 2013-02-22, 22:12
+
Francis Galiegue 2013-02-22, 22:24
+
Francis Galiegue 2013-02-23, 01:44