aboutsummaryrefslogtreecommitdiff
path: root/core/encoding/json/marshal.odin
diff options
context:
space:
mode:
authorFeoramund <161657516+Feoramund@users.noreply.github.com>2024-04-27 05:24:59 -0400
committerFeoramund <161657516+Feoramund@users.noreply.github.com>2024-04-27 05:24:59 -0400
commit309a770cbf49ef950a9c9e02ccfaced57f59e73a (patch)
treec69895582bdffaa5d8c333c57ff6ad5a270c664d /core/encoding/json/marshal.odin
parentf745fff640ab1582bdfdd18a7239c58fa37db753 (diff)
Fix `omitempty` in `json.marshal`
Diffstat (limited to 'core/encoding/json/marshal.odin')
-rw-r--r--core/encoding/json/marshal.odin2
1 files changed, 1 insertions, 1 deletions
diff --git a/core/encoding/json/marshal.odin b/core/encoding/json/marshal.odin
index 04ef6d434..f45cdb1f1 100644
--- a/core/encoding/json/marshal.odin
+++ b/core/encoding/json/marshal.odin
@@ -420,7 +420,7 @@ marshal_to_writer :: proc(w: io.Writer, v: any, opt: ^Marshal_Options) -> (err:
data := rawptr(uintptr(v.data) + info.offsets[i])
the_value := any{data, id}
- if is_omitempty(the_value) {
+ if omitempty && is_omitempty(the_value) {
continue
}