Open
Description
https://stackoverflow.com/a/60203562/12849275
From json.Marshal():
Channel, complex, and function values cannot be encoded in JSON. Attempting to encode such a value causes Marshal to return an UnsupportedTypeError.
JSON cannot represent cyclic data structures and Marshal does not handle them. Passing cyclic structures to Marshal will result in an infinite recursion.
Going further, not mentioned in the doc, but unsafe.Pointer also cannot be marshaled.
Same goes for any composite type containing an unsupported type (e.g. slice of channels, struct holding an unsafe.Pointer exported field etc.).
Metadata
Metadata
Assignees
Labels
No labels