go icon indicating copy to clipboard operation
go copied to clipboard

When will the function Marshal return an error?

Open XJangel opened this issue 4 years ago • 0 comments

Hi all, I wanna know when will the funtion Marshal return an error in library json-iterator? Is it the same as library json? Library json shows the following scenes: (1) Channel, complex, and function values cannot be encoded in JSON. Attempting to encode such a value causes Marshal to return an UnsupportedTypeError. (2) JSON cannot represent cyclic data structures and Marshal does not handle them. Passing cyclic structures to Marshal will result in an error. Thanks a lot!

XJangel avatar Nov 18 '21 12:11 XJangel