diff options
| author | Laytan <laytanlaats@hotmail.com> | 2025-12-31 03:24:36 +0100 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2025-12-31 03:24:36 +0100 |
| commit | e27a06b1f05df01bdebc466e216b3556a9bbeffd (patch) | |
| tree | df9406b2cdff22120cd4aca1ed769c4ce0c21153 | |
| parent | 107104ab4b199867bcf1c0404c82ec0d18cbc71d (diff) | |
| parent | 589dbbddd20f444786e1d71258faf2f692450c49 (diff) | |
Merge pull request #6085 from dozn/json-null-marshal
[encoding/json] Fix Unicode Output When Marshalling
| -rw-r--r-- | core/encoding/json/marshal.odin | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/core/encoding/json/marshal.odin b/core/encoding/json/marshal.odin index acf12331a..c4e348aa8 100644 --- a/core/encoding/json/marshal.odin +++ b/core/encoding/json/marshal.odin @@ -122,9 +122,9 @@ marshal_to_writer :: proc(w: io.Writer, v: any, opt: ^Marshal_Options) -> (err: case runtime.Type_Info_Rune: r := a.(rune) - io.write_byte(w, '"') or_return - io.write_escaped_rune(w, r, '"', true) or_return - io.write_byte(w, '"') or_return + io.write_byte(w, '"') or_return + io.write_escaped_rune(w, r, '"', for_json = true) or_return + io.write_byte(w, '"') or_return case runtime.Type_Info_Float: switch f in a { |