Skip to content

Fix JSON encoding of large integers - #196

Open
vera-rubin wants to merge 1 commit into
cloud-custodian:mainfrom
vera-rubin:fix/json-integer-range
Open

vera-rubin wants to merge 1 commit into
cloud-custodian:mainfrom
vera-rubin:fix/json-integer-range

Conversation

@vera-rubin

Copy link
Copy Markdown

CELJSONEncoder emits 9007199254740993 as a JSON number, but CEL's JSON mapping requires the decimal string "9007199254740993" for integers outside ±(2⁵³−1). On main (22158f8), run:

python -m celpy -n '9007199254740993'

We convert large CEL integers to strings during the encoder's existing recursive walk, keeping values inside the range as numbers.

We tested signed and unsigned boundaries at the top level and in nested lists and maps, and ran the unit suite and doctests.

— ChipLab

@linux-foundation-easycla

Copy link
Copy Markdown

CLA Not Signed

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant