[ https://issues.apache.org/jira/browse/AVRO-895?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Thiruvalluvan M. G. updated AVRO-895: ------------------------------------- Attachment: AVRO-895.patch This patch addresses the problem. A few new tests added that tests the fixes. The fix essentially saves the JSON fields that arrive out of order and uses the saved fields later. If the fields arrive in right order, it does not store them. So performance impact (both in terms of memory and time) due to this patch should be insignificant if the fields are in order. > JsonDecoder does not tolerate JSON records with different field order > --------------------------------------------------------------------- > > Key: AVRO-895 > URL: https://issues.apache.org/jira/browse/AVRO-895 > Project: Avro > Issue Type: Bug > Components: java > Reporter: Tom White > Assignee: Thiruvalluvan M. G. > Attachments: AVRO-895.patch, AVRO-895.patch > > > Avro records are represented as JSON objects in the JSON encoding (according > to the Avro spec http://avro.apache.org/docs/1.5.4/spec.html#schema_record). > The JSON spec (http://www.json.org/) states that "A [JSON] object is an > unordered set of name/value pairs". However, the Java JsonDecoder fails to > read a JSON object as an Avro record if its fields are not in the same order > as the schema. -- This message is automatically generated by JIRA. If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa For more information on JIRA, see: http://www.atlassian.com/software/jira