mirror of
https://github.com/Ed94/Odin.git
synced 2026-08-03 22:28:46 +00:00
Allow for comma-separate json names json:"name,flag"
This commit is contained in:
@@ -371,6 +371,7 @@ marshal_to_writer :: proc(w: io.Writer, v: any, opt: ^Marshal_Options) -> (err:
|
||||
info := ti.variant.(runtime.Type_Info_Struct)
|
||||
for name, i in info.names {
|
||||
json_name := reflect.struct_tag_get(reflect.Struct_Tag(info.tags[i]), "json")
|
||||
json_name = json_name_from_tag_value(json_name)
|
||||
|
||||
opt_write_iteration(w, opt, i) or_return
|
||||
if json_name != "" {
|
||||
|
||||
Reference in New Issue
Block a user