mirror of
https://github.com/mikefarah/yq.git
synced 2026-09-06 10:04:43 +08:00
Fix JSON encoding removing null #985
This commit is contained in:
@@ -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
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user