Details
-
Bug
-
Status: Resolved
-
Major
-
Resolution: Duplicate
-
1.9.1
-
None
-
None
-
JSON, LocalDate
Description
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.
Attachments
Issue Links
- is duplicated by
-
AVRO-3124 Java: toString serializer produces incorrect JSON fields for Temporal logical types
- Resolved