Skip to content

Commit

Permalink
Do not marshal <json-key> name to the JSON
Browse files Browse the repository at this point in the history
When exporting to json certain arrays may be marshalled as key value pair
instead (using <json-key> as key). If that is the case, we should avoid
exporting the given key within the index objects.
  • Loading branch information
isimluk committed Nov 27, 2020
1 parent c7b5372 commit 21116f0
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
1 change: 1 addition & 0 deletions metaschema/templates/generated_multiplexers.tmpl
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,7 @@ import (
return []byte{}, err
}

v.{{.JsonKey}} = ""
text, err := json.Marshal(&v)
if err != nil {
return []byte{}, err
Expand Down
2 changes: 1 addition & 1 deletion metaschema/templates/pkged.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 21116f0

Please sign in to comment.