[ https://issues.apache.org/jira/browse/AVRO-1201?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13501524#comment-13501524 ]
Doug Cutting commented on AVRO-1201: ------------------------------------ Sorry, I lost track of this one. Some comments on the patch: - The toString() method should probably use isX() methods througout, so isMap(), isFixed(), isArray(), isString(), and isEnum(). - I don't think we should change the definitions of isEnum() in GenericData and SpecificData. If you're calling toString() on data that might include java.lang.Enum instances then you should use SpecificData or ReflectData, not GenericData. - We should add a test for the correct toString() of enums. > CLONE - GenericRecord.toString can produce invalid JSON > ------------------------------------------------------- > > Key: AVRO-1201 > URL: https://issues.apache.org/jira/browse/AVRO-1201 > Project: Avro > Issue Type: Bug > Components: java > Affects Versions: 1.7.2 > Reporter: Sharmarke Aden > Assignee: Jay Kreps > Attachments: avro-1201.patch, avro-1201.patch, > Avro-1201-TestCase.tar.gz > > > The GenericData.toString method can produce invalid JSON. The problem is that > enums are printed without quotes, as in > {"emum_field":a} > instead of > {"enum_field":"a"} -- 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