[
https://issues.apache.org/jira/browse/AVRO-3124?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17335509#comment-17335509
]
Ryan Skraba commented on AVRO-3124:
-----------------------------------
Hello! I have an opinion (see AVRO-2343 , AVRO-3061) about parsing a value
returned by *{{.toString()}}* – you will happier if you never attempt to parse
that value. It's not the same as JSON-encoded Avro, and it's not standardized
across languages or across Avro versions!
If you want JSON, you should really be using the JsonEncoder/JsonDecoder
classes.
But given that it's such a common request, let's fix it at least for temporal
types! Thanks for the PR.
> Java: toString serializer produces incorrect JSON fields for Temporal logical
> types
> -----------------------------------------------------------------------------------
>
> Key: AVRO-3124
> URL: https://issues.apache.org/jira/browse/AVRO-3124
> Project: Apache Avro
> Issue Type: Bug
> Components: java
> Reporter: Artur Kalimullin
> Assignee: Artur Kalimullin
> Priority: Major
>
> When the java class has been generated using one of the Temporal logical
> types and then converted to JSON using toString(), the output field does is
> not a proper string:
>
> {code:java}
> "operationTime": 2021-04-29T04:01:57.465Z
> {code}
> This is an ISO-8601 compliant string, so it should be treated as a string:
>
> {code:java}
> "operationTime": "2021-04-29T04:01:57.465Z"
> {code}
--
This message was sent by Atlassian Jira
(v8.3.4#803005)