Skip to content

NumericDate marshals to JSON with decimals for large dates #158

@JohanLindvall

Description

@JohanLindvall

The following code results in str being equal to "5243700879.000001"

buf, _ := jwt.NewNumericDate(time.Unix(5243700879, 0)).MarshalJSON()
str := string(buf)

I expected the JSON representation to be without decimals.

Metadata

Metadata

Labels

bugSomething isn't workinghelp wantedExtra attention is needed

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions