Minimal JSON parser. Converts JSON to R objects with proper type handling.
Type Mappings
Object
{}-> named listArray
[]-> unnamed listString -> character
Number -> numeric
true/false-> logicalnull->NULL
RFC 8259 Non-conformance
Invalid JSON returns an empty list instead of erroring.
Duplicate keys are preserved; R accessors (
$,[[) return first match.Non-standard number forms may be accepted (e.g., leading zeros, hexadecimal).
Invalid escape sequences are output literally (e.g.,
\\uZZZZbecomes"uZZZZ").Incomplete Unicode escape sequences for emoji are tolerated.
Nesting depth is limited to 512 levels.