diff --git a/om/json/README.md b/om/json/README.md index e5f1a19..c1d8fdd 100644 --- a/om/json/README.md +++ b/om/json/README.md @@ -92,7 +92,7 @@ syntax state: punctuation/field sequencing is the caller's responsibility. canonicalization scheme. Output can exceed the input size and fail explicitly. String output matches Go `json.Marshal(string)`: standard short control escapes, lowercase `\u` -hex, HTML escapes for `<`, `>` and `&`, and escapes for U+2028/U+2029. Invalid UTF-8 becomes the replacement character as raw UTF-8 bytes; a valid + hex, HTML escapes for `<`, `>`, and `&`, and escapes for U+2028/U+2029. Invalid UTF-8 becomes the six-character escape `\ufffd`, matching the Go 1.26 encoder the test corpus is generated with; a valid U+FFFD scalar is written as its raw UTF-8 bytes. U+FFFD scalar is written the same way, matching Go. Internal helpers all have the `json` prefix; callers should use the APIs above. diff --git a/om/json/json.om b/om/json/json.om index 1038cec..9812919 100644 --- a/om/json/json.om +++ b/om/json/json.om @@ -650,7 +650,7 @@ p = jsonuesc o p v end else if and eq v 65533 eq get r 1 1 -p = jsonrune o p v +p = jsonuesc o p v else p = jsonrune o p v end