[ 
https://issues.apache.org/jira/browse/AVRO-1329?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17109132#comment-17109132
 ] 

Felix GV commented on AVRO-1329:
--------------------------------

I also like #2 and #4 best, because they are resilient to sparse and out of 
order (i.e. non-parallel) attributes.

I have a slight preference for #4, because it’s slightly more concise and 
because it relies on the JSON parser to guarantee the unicity of symbols, 
rather than the Avro parser.

That could be viewed as a disadvantage, however, I suppose, since the JSON spec 
only says that object fields SHOULD be unique, and some JSON parser 
implementations might instead silently tolerate duplicate field names (and 
return the first or last value...). In that sense, even if we used a JSON 
object, the Avro spec might want to explicitly include som defensive language 
to indicate that the Avro parser must guarantee unicity of symbol names in the 
map.

Anyway, either syntax is fine, IMHO.

> Get per-symbol doc for enums
> ----------------------------
>
>                 Key: AVRO-1329
>                 URL: https://issues.apache.org/jira/browse/AVRO-1329
>             Project: Apache Avro
>          Issue Type: Improvement
>          Components: doc
>    Affects Versions: 1.7.4
>            Reporter: Felix GV
>            Priority: Minor
>
> It would be nice to have the ability to add documentation for each symbol of 
> an enum.
> Doug Cutting, quoted from the mailing list:
> Documentation per enum symbol is not currently supported, but would not be 
> difficult to add. Please file an issue in Jira if you'd like to see this. For 
> compatibility, in Json, this would probably appear as a parallel array of 
> documentation strings, e.g., something like:
> ("name": "Foo", "type":"enum", "doc":"an enum", "symbols":["X","Y"], 
> "symbols-doc":["X is X", "Y is Y"]}



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

Reply via email to