Repository navigation
Conversation
Contributor
|
Thank you, @qoke, for reporting these issues and for providing proposed fixes. We reviewed all nine reports and used your suggestions where they made sense in the codebase. All nine issues have now been resolved in #34, each with corresponding regression tests, and the fixes are published in v1.11.0. The issue addressed by this PR (#19) is covered by that release, so we are closing this PR in favor of the consolidated fix. For future reports, please start with issues only so we can discuss the approach before opening pull requests. Thanks again for helping improve the project. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes #19.
fromjsoncould lose integer precision by decoding numbers as floating point. Decoding objects through unordered maps could also change the order in which templates iterate over their keys.The decoder now retains numeric tokens as
json.Numberuntil their type is determined. A recursive token reader constructs ordered dictionaries from the input, including nested objects and arrays. It also rejects trailing content after the first complete JSON value and adds context to decoding errors.Decoding
{"id":9007199254740993}now preserves the integer exactly. Iterating over{"upf":1,"amf":2}retains the input key order. Integer preservation remains bounded by the engine’s supported range.Both regression cases pass against the Python reference. The reference registers
fromjsonusingjson.loads, since it isn’t a built-in Python Jinja2 filter. The original failing Go results are included.go test -count=1 ./...passes.