markphelps / optional

Optional is a library of optional Go types
https://godoc.org/github.com/markphelps/optional
MIT License
210 stars 19 forks source link

Complex Types are not supported by JSON encoder #13

Closed codyolsen closed 3 years ago

codyolsen commented 3 years ago

Attempting to marshal/unmarshal Complex64 and Complex128 will throw json: unsupported type: complex[64/128] as they are not supported by the JSON encoder.

https://github.com/golang/go/blob/129bb1917b4914f0743ec9b4ef0dfb74df39c07d/src/encoding/json/encode.go#L150

markphelps commented 3 years ago

Thanks @codyolsen . Fixed in #16 and released in v0.8.0