diff options
| author | dozn <andymrsimmons@gmail.com> | 2025-12-30 04:42:06 -0800 |
|---|---|---|
| committer | dozn <andymrsimmons@gmail.com> | 2025-12-30 04:42:06 -0800 |
| commit | affaefc13ace1ac95b97c043314da13d4587eb44 (patch) | |
| tree | 32527de668493e05e26c7dd4f2334566ed549912 /core/encoding | |
| parent | ba68d75c6ff163c8c09793c9f42bab8229b6f490 (diff) | |
Moved `first_iteration` up a couple lines so it makes sense readability-wise.
Diffstat (limited to 'core/encoding')
| -rw-r--r-- | core/encoding/json/marshal.odin | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/core/encoding/json/marshal.odin b/core/encoding/json/marshal.odin index bed2018e3..acf12331a 100644 --- a/core/encoding/json/marshal.odin +++ b/core/encoding/json/marshal.odin @@ -413,13 +413,13 @@ marshal_to_writer :: proc(w: io.Writer, v: any, opt: ^Marshal_Options) -> (err: } opt_write_iteration(w, opt, first_iteration) or_return + first_iteration = false if opt.pretty { comment := reflect.struct_tag_get(reflect.Struct_Tag(info.tags[i]), "jsoncomment") opt_write_comment(w, opt, &comment) or_return } - first_iteration = false if json_name != "" { opt_write_key(w, opt, json_name) or_return } else { |