Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Support for ISO8601 JSON standard dates and datetimes #282

Open
passuied opened this issue Jan 3, 2024 · 0 comments
Open

Support for ISO8601 JSON standard dates and datetimes #282

passuied opened this issue Jan 3, 2024 · 0 comments

Comments

@passuied
Copy link

passuied commented Jan 3, 2024

The current Codec standard json addition (e.g. NewCodecForStandardJSONFull()) only seems to support long datetimes and int dates respectively...

When passing a date as ISO8601 (e.g. 2024-01-02T19:55:36.654287-08:00), it throws the following error:

could not decode any json data in input \"2024-01-02T19:55:36.654287-08:00\",\"flavor\":\"chocolate\"} for key: \"created_date\""}

Here are the steps to reproduce:

  • Schema: {"type": "record", "name": "cupcake", "fields": [{"name": "flavor", "type": "string"}, {"name": "created_date", "type": ["null",{"type": "long","logicalType": "timestamp-millis"}],"default": null}]}
  • JSON: "{"created_date":"2024-01-02T19:55:36.654287-08:00","flavor":"chocolate"}"
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant