Skip to content

ABI: implement exact ZigString JSON parsing #238

Description

@chrisbbreuer

Parent: #134
Related: #140, #163, #164

Implement the pinned ZigString__toJSONObject private-ABI boundary, including its unusual returned-error-value contract.

Acceptance

  • Decode every supported ZigString representation and parse complete JSON with exact object/array/primitive construction and UTF-16 behavior.
  • Return the parsed value on success; on JSON syntax failure return the thrown SyntaxError value after clearing the transient VM exception, matching the pinned Bun boundary rather than publishing an ordinary pending exception.
  • Reject over-limit strings with an ERR_STRING_TOO_LONG Error value and avoid dereferencing an impossible oversized span.
  • Preserve selected-realm prototypes, sibling-realm operation, invalid-input/OOM safety, and an already-pending first exception.
  • Add focused leak coverage and the pinned consumer fixture, then refresh inventories, README/docs, and parent evidence.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions