diff options
| author | gingerBill <bill@gingerbill.org> | 2022-09-14 18:23:46 +0100 |
|---|---|---|
| committer | gingerBill <bill@gingerbill.org> | 2022-09-14 18:27:02 +0100 |
| commit | 1e595f2e2697342e82af7cae6682378a64ae5897 (patch) | |
| tree | b6e2a6021bf71c3079e0647fa984626e256b820c /core/encoding | |
| parent | 28ad4f8623b31e21a8a63ef69aa85a7f070bc20b (diff) | |
Add missing import
Diffstat (limited to 'core/encoding')
| -rw-r--r-- | core/encoding/json/marshal.odin | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/core/encoding/json/marshal.odin b/core/encoding/json/marshal.odin index 6834acd8a..10fb4c348 100644 --- a/core/encoding/json/marshal.odin +++ b/core/encoding/json/marshal.odin @@ -5,6 +5,7 @@ import "core:math/bits" import "core:runtime" import "core:strconv" import "core:strings" +import "core:reflect" import "core:io" Marshal_Data_Error :: enum { @@ -302,7 +303,7 @@ marshal_to_writer :: proc(w: io.Writer, v: any, opt: ^Marshal_Options) -> (err: for name, i in info.names { opt_write_iteration(w, opt, i) or_return - if json_name := string(reflect.struct_tag_get(info.tags[i], "json")); json_name != "" { + if json_name := string(reflect.struct_tag_get(auto_cast info.tags[i], "json")); json_name != "" { opt_write_key(w, opt, json_name) or_return } else { opt_write_key(w, opt, name) or_return |