avro-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Doug Cutting (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (AVRO-1157) Idl tool - parse properties as plain String OR expose the property as Json
Date Wed, 12 Sep 2012 21:49:07 GMT

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

Doug Cutting commented on AVRO-1157:
------------------------------------

The problem with value.toString() alone is that then textual values would have quotes around
them.  But we might try something like:
{code}
return value.isTextual() ? value.getTextValue() : value.toString();
{code}

With that you should be able to add Json-format annotations without so many escapes, e.g.:
@Entity({"column":"id"})

The value stored in the schema would always be a string, and sometimes it would be a string
that's Json and sometimes not, just like today.
                
> Idl tool - parse properties as plain String OR expose the property as Json
> --------------------------------------------------------------------------
>
>                 Key: AVRO-1157
>                 URL: https://issues.apache.org/jira/browse/AVRO-1157
>             Project: Avro
>          Issue Type: Improvement
>          Components: java, spec
>    Affects Versions: 1.7.1
>            Reporter: Cristian Opris
>            Priority: Minor
>
> The IDL Tool currently parses "annotations" as Json objects but only really supports
textual values.
> If one wants to have actual json annotations, they need to write json as an escaped json
string.
> Proposed solutions:
> - expose the property as Json if it's parsed as Json
> - OR  parse the property as a string

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

Mime
View raw message