Fix JSON encoding removing null #985

This commit is contained in:
Mike Farah
2021-10-30 13:37:21 +11:00
parent 2b3d0552a6
commit 08fc058934
2 changed files with 20 additions and 1 deletions
+2 -1
View File
@@ -211,7 +211,8 @@ func (o *orderedMap) UnmarshalYAML(node *yaml.Node) error {
}
return nil
case yaml.SequenceNode:
var res []orderedMap
// note that this has to be a pointer, so that nulls can be represented.
var res []*orderedMap
if err := node.Decode(&res); err != nil {
return err
}