You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@avro.apache.org by "Stephan Engelmann (Jira)" <ji...@apache.org> on 2019/09/20 16:01:00 UTC
[jira] [Created] (AVRO-2567) GenericRecord.toString can produce
invalid JSON
Stephan Engelmann created AVRO-2567:
---------------------------------------
Summary: GenericRecord.toString can produce invalid JSON
Key: AVRO-2567
URL: https://issues.apache.org/jira/browse/AVRO-2567
Project: Apache Avro
Issue Type: Bug
Components: java
Affects Versions: 1.9.1
Reporter: Stephan Engelmann
The GenericData.toString method can produce invalid JSON. The problem is that unknown Objects are printed without quotes, as in
{"endDate": 2039-11-06}
instead of
{"endDate": "2039-11-06"}
The example used a java.time.LocalDate as object. A similar Issue was discussed and resolved in AVRO-713. Using an escaped string representation between two douple quotes should suffice for most cases.
--
This message was sent by Atlassian Jira
(v8.3.4#803005)