wk8 / go-ordered-map

Optimal implementation of ordered maps for Golang - ie maps that remember the order in which keys were inserted.
Apache License 2.0
534 stars 40 forks source link

Umarshal not working #31

Closed oq-x closed 1 year ago

oq-x commented 1 year ago
var plistData = orderedmap.New[string, interface{}]()
_, err = plist.Unmarshal(content, &plistData)
    if err != nil {
        fmt.Println("Error parsing plist data:", err)
        return
    }

Error: Error parsing plist data: plist: type mismatch: tried to decode plist typedictionary' into value of type *orderedmap.OrderedMap[string,interface {}]'

wk8 commented 1 year ago

There's tests on this: https://github.com/wk8/go-ordered-map/blob/master/json_test.go#L112, so it works for at least some inputs :P

So unless you give me a specific test case where it fails, can't help you much.

wk8 commented 1 year ago

Oh sorry read too fast. You want to parse a PLIST input? Yeah we don't support that. Should be easy to do though, I always welcome PRs.

oq-x commented 1 year ago

damn