google / starlark-go

Starlark in Go: the Starlark configuration language, implemented in Go
BSD 3-Clause "New" or "Revised" License
2.26k stars 204 forks source link

lib/json: allow encoding dicts with int keys #468

Closed andreimatei closed 1 year ago

andreimatei commented 1 year ago

Before this patch, only dicts with string keys were supported. Now, integer keys are also permitted. Dicts with int keys should be common. This matches Go's json.Marshal() and Python's json.dumps(), which also permit int keys (in addition to other things).

andreimatei commented 1 year ago

Closing this for now as it does not look like an immediate accept. Might reopen later in the context of a broader Starlark proposal.