Repository navigation
Use only the public API of JSON.jl, and remove playground/ - #17
Merged
Merged
Conversation
- Reading numbers as `BigFloat` (`fromjson` into structs with a non-`Float64` real type) no longer uses internal functions of JSON.jl (`applyobject`, `applyarray`, `gettype`, `JSONTypes`): objects and arrays are read one level at a time as `JSONText`, and each value is parsed in turn. Same results on the BeerJSON samples. - Remove the old exploratory scripts in `playground/`, which used packages that are not dependencies (JSON3, HTTP). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
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.
Two clean-ups before registering the package.
Changes
fromjsoninto structs with a non-Float64real type, e.g.BeerJSON{BigInt, BigFloat}) used four functions that JSON.jl does not declare public:applyobject,applyarray,gettypeandJSONTypes. A minor JSON.jl release could change them._jsparsebignow reads objects and arrays one level at a time asJSON.JSONText, usingJSON.Object{String, JSONText}andVector{JSONText}, and parses each value in turn. Numbers that are not integers go throughJSON.parse(text, BigFloat). Key order is preserved.BeerJSON{BigInt, BigFloat}(compared viatojson).Float64types is unchanged.playground/: two old exploratory scripts that used JSON3 and HTTP, which are not dependencies.Checks
Pkg.test()passes on Julia 1.13 (487 tests) and 1.10 (485 tests), including the tests of full-precision reading.Generated by Claude Code