Skip to content

Fix json_parse to return Map instead of Record for JSON objects#30

Merged
jaimeam merged 1 commit into
mainfrom
claude/fix-json-object-map-KGx2u
Feb 19, 2026
Merged

Fix json_parse to return Map instead of Record for JSON objects#30
jaimeam merged 1 commit into
mainfrom
claude/fix-json-object-map-KGx2u

Conversation

@jaimeam

@jaimeam jaimeam commented Feb 19, 2026

Copy link
Copy Markdown
Owner

JSON objects parsed via json_parse() were returned as Value::Record,
which meant map methods like .get(), .keys(), .values(), .entries()
etc. were unavailable on parsed objects. Changed json_parse_object to
build Vec<(Value, Value)> and return Value::Map so that all Map
instance methods work on parsed JSON objects.

Also added Value::Map support to Expr::FieldAccess so that dot-syntax
(e.g. obj.name) continues to work on Map values, preserving backward
compatibility with existing code.

https://claude.ai/code/session_01XWitYKfWuyRZshH5rjuQF6

JSON objects parsed via json_parse() were returned as Value::Record,
which meant map methods like .get(), .keys(), .values(), .entries()
etc. were unavailable on parsed objects. Changed json_parse_object to
build Vec<(Value, Value)> and return Value::Map so that all Map
instance methods work on parsed JSON objects.

Also added Value::Map support to Expr::FieldAccess so that dot-syntax
(e.g. obj.name) continues to work on Map values, preserving backward
compatibility with existing code.

https://claude.ai/code/session_01XWitYKfWuyRZshH5rjuQF6
@jaimeam jaimeam merged commit 65c8722 into main Feb 19, 2026
6 checks passed
@jaimeam jaimeam deleted the claude/fix-json-object-map-KGx2u branch February 19, 2026 02:43
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.

2 participants