Repository navigation
Conversation
JsonValue::dump() writes an empty JsonObject as "null", so a document
re-dumped after parsing loses every "{}" and the reader sees null. This
test is red until to_nlohmann() builds objects as objects.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_013VUubhHeYSMGSSDXZkKZss
to_nlohmann() started each object as a default nlohmann::json, which is null until a key is added, so an empty object came out as null. Build it as object_t, as arrays already use array_t. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_013VUubhHeYSMGSSDXZkKZss
One case per container shape, registered from a named table, so a failure names the shape that lost its type. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_013VUubhHeYSMGSSDXZkKZss
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_013VUubhHeYSMGSSDXZkKZss
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01AKYzhrMnPK61XHWEch4a6E
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.
Base:
main. No parent PRs; the diff shows only this change. Merged into #258 (FRLG checkpoint replay), which needs it.JsonValue::dump()writes an emptyJsonObjectasnull, so any document that is parsed and dumped again loses its{}values.to_nlohmann()started each object as a defaultnlohmann::json, which stays null until a key is added. It now buildsobject_t, as arrays already usearray_t.Common::JsonToolsround-trip tests: an empty object, a nested empty object and a nested empty array must survive dump and reparse.This was the cause of 14 of the 17
PokemonFRLG::StoryReplayfailures on #258: that test re-dumpsbinding.json, whose"parameters": {}came back as null.Testing
Headless runner (
SerialProgramsTests) on macOS:Common::JsonTools3/3 (the empty-object case was red before the fix), andPokemonFRLG::StoryReplayat #258 went from 3/17 to 17/17.🤖 Generated with Claude Code
https://claude.ai/code/session_013VUubhHeYSMGSSDXZkKZss