Skip to content

Json submod#113

Merged
mdbergmann merged 3 commits into
masterfrom
json-submod
Feb 25, 2026
Merged

Json submod#113
mdbergmann merged 3 commits into
masterfrom
json-submod

Conversation

@mdbergmann
Copy link
Copy Markdown
Owner

No description provided.

mdbergmann and others added 3 commits February 25, 2026 20:25
Complete JSON library for ACE BASIC using Hashmap (objects) and DynArray
(arrays) as the intermediate representation. TYPECASE discriminates
object vs array at each node.

Phases implemented:
- Phase 0: Descriptor stamping in HmNew/DaNew for TYPECASE compatibility
- Phase 1: Parser for objects with scalar values (string, int, bool, null)
- Phase 2: Parser for arrays, nesting, floats, depth tracking
- Phase 3: String escapes, JsParseFile, error edge cases
- Phase 4: Compact JSON generator (JsWrite, JsToStr$)
- Phase 5: Pretty-printer (JsWriteFmt) with 2-space indentation + round-trip tests
- Phase 6: Recursive JsFree, JsMakeObj/JsMakeArr convenience helpers

Public API: JsParse, JsParseFile, JsError$, JsRootType, JsWrite,
JsWriteFmt, JsToStr$, JsFree, JsMakeObj, JsMakeArr

320 test assertions across 7 test files, all passing.

Co-Authored-By: Claude Opus 4.6 <[email protected]>
Use lvl% = -1 for compact mode, lvl% >= 0 for formatted mode.
Eliminates 74 lines of duplicated value-dispatch code.

Co-Authored-By: Claude Opus 4.6 <[email protected]>
@mdbergmann mdbergmann merged commit 2b10435 into master Feb 25, 2026
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