Skip to content

Implement delimiter-aware N-quoted strings #3

Description

@delaneyj

Upstream: starfederation/ron#33
Related escape update: #1

Problem

The universal escape rules currently described in #1 include rejecting raw double quotes in every string form. The upstream reference has identified that as a flaw: it defeats N-quote framing and makes embedded JSON unnecessarily noisy.

Intended RON:

data ['{"coordinates":[12.5,-42.25],"type":"Point"}']

Not:

data ['{\"coordinates\":[12.5,-42.25],\"type\":\"Point\"}']

Required behavior

When implementing #1 against the corrected upstream corpus:

  • Keep JSON escape decoding in every string form.
  • Keep \\, control-character escapes, Unicode handling, and raw C0 rejection.
  • Permit raw double quotes inside apostrophe-delimited strings.
  • Permit quote runs shorter than the active N-quote delimiter.
  • Keep \" as accepted input.
  • Do not unconditionally escape double quotes before selecting the rendering delimiter.

Acceptance

  • The raw embedded-JSON example parses and round-trips.
  • JSON-to-RON renders that value without \".
  • Repeated-double-quote framing accepts internal shorter quote runs.
  • The implementation passes the corrected upstream conformance corpus.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions