[
https://issues.apache.org/jira/browse/AVRO-258?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12792611#action_12792611
]
Doug Cutting commented on AVRO-258:
-----------------------------------
First, I don't think we want to make such a tool a part of the spec: we don't
expect there to be more than a single implementation of it, do we? Given that,
we should implement it such a way that it's available to the widest variety of
platforms: Perl or Python might thus be preferable to Java.
Support for comments and includes would we wonderful to have.
Another approach, rather than trying to make the syntax more Java-like,
implementing a full parser, is to just remove the most annoying things from
JSON. A good pre-processor that supports includes, comments and made quotes
optional would make things vastly more readable and functional. Beyond that,
it starts to become lisp-versus-algol, unresolvable and a tremendous time sink.
If we wanted to get fancy, we could try to do more complex JSON
transformations, like transform "foo bar {}" (no comma) into "{type: foo, name:
bar, ...}", and "a; b; c;" into [a, b, c], etc.
{type: record, name: Foo, fields: [{name: f, type string}], java-class: FooImpl}
{type: enum, name: Bar, symbols: [X, Y, Z]}
become
record Foo { fields: string f {}; java-class: FooImpl}
enum Bar { symbols: X; Y; Z; }
A json-preprocessor approach lets us more easily support default values,
metadata, etc, and makes the transition to JSON easier for folks, since
developers will see JSON-format schemas too. My first choice would probably be
to simply support comments, includes and make quotes optional. That would
gives us great bang for very little buck. But I may not be able to convince
anyone else of this...
> Higher-level language for authoring schemata
> --------------------------------------------
>
> Key: AVRO-258
> URL: https://issues.apache.org/jira/browse/AVRO-258
> Project: Avro
> Issue Type: New Feature
> Components: spec
> Reporter: Todd Lipcon
> Assignee: Todd Lipcon
>
> Early users of Avro have noted that authoring schemas and especially
> protocols in JSON feels unnatural. This JIRA is to work on a higher-level
> language that feels more like defining interfaces and classes in Java/C/etc.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.