linkedin / linkedin/goavro

Support for ISO8601 JSON standard dates and datetimes

Open
#282 0 comments 1 reaction 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Go
Stars
1.1k
Forks
232
PR merge metrics
No merged PRs in 30d

Description

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\"}"

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reproducing the failure with NewCodecForStandardJSONFull(), the supplied schema, and the ISO8601 JSON value. Trace the standard JSON date and datetime decoding path; done means the timestamp-millis value accepts the shown ISO8601 form while existing long datetime and int date inputs continue to work.

Written by the indexing model from the issue text.

Assessment

Tech stack
go
Domain
data
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.