yq/pkg/yqlib/ordered_map.go
Anders F Björklund 0c2d05d33f Refactor ordered_map into separate files
Separate json and xml, from the regular yaml.

Makes it possible to compile, without those...
2023-02-14 16:40:07 +01:00

15 lines
343 B
Go

package yqlib
// orderedMap allows to marshal and unmarshal JSON and YAML values keeping the
// order of keys and values in a map or an object.
type orderedMap struct {
// if this is an object, kv != nil. If this is not an object, kv == nil.
kv []orderedMapKV
altVal interface{}
}
type orderedMapKV struct {
K string
V orderedMap
}