You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Dec 15, 2025. It is now read-only.
Repository navigation
This repository was archived by the owner on Dec 15, 2025. It is now read-only.
The key piece of the above playground is that, if a struct type has a method MarshalJSON with a pointer receiver, and if there's a field of of a struct with the non-pointer type, the behavior diverge: the stdlib's encoding/json doesn't call MarshalJSON, but Jsoniter does. In the playground linked above, this is shown on the serialization of the field BarNoPtr.
Now, I'm not claiming that Jsoniter's behavior is incorrect (I think it's reasonable behavior; in the very least, it's much more consistent than stdlib's behavior, as the full playground shows). The issue I'm bringing up is specifically the claim of 100% compatibility when using jsoniter.ConfigCompatibleWithStandardLibrary.
Activity