Skip to content

time: UnmarshalJSON does not respect escaped unicode characters #47353

@rittneje

Description

@rittneje

What version of Go are you using (go version)?

1.16.6

Does this issue reproduce with the latest release?

Yes.

What operating system and processor architecture are you using (go env)?

The playground.

What did you do?

Unmarshaled a JSON string containing an escaped unicode character into a time.Time.

https://play.golang.org/p/MV6VeYcalrQ

What did you expect to see?

I expected it to parse correctly as per the JSON spec.

What did you see instead?

It did not understand the escaped character.

parsing time ""2009-11-10T23:00:00\u005a"" as ""2006-01-02T15:04:05Z07:00"": cannot parse "\u005a"" as "Z07:00"

Metadata

Metadata

Assignees

No one assigned

    Labels

    NeedsInvestigationSomeone must examine and confirm this is a valid issue and not a duplicate of an existing one.

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions