elliotchance / elliotchance/orderedmap
`json.Marshal` — doesn't work
Open
- Dominant language
- Go
- Stars
- 1k
- Forks
- 77
- PR merge metrics
- No merged PRs in 30d
Description
Hi,
I try convert `OrderedMap` to `json`, but receive empty object :/
```go
package main
import (
"fmt"
"encoding/json"
"github.com/elliotchance/orderedmap"
)
func main() {
m := orderedmap.NewOrderedMap()
m.Set("foo", "bar")
m.Set("qux", 1.23)
m.Set(123, true)
b, err := json.Marshal(m)
if err != nil {
fmt.Println("error:", err)
}
fmt.Println("result:", string(b)) // "result: {}" ⚠️
}
```
https://play.golang.org/p/UFER3tR6uPA
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.