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.
json-iterator/go is not 100% compatible drop-in replacement of encoding/json #229
changed the title [-]Missing Compact/Indent/HTMLEscape comparing to encoding/json[/-][+]json-iterator/go is not 100% compatible drop-in replacement of encoding/json[/+]on Jan 28, 2018
Reacted by Aniruddha Maru, kingeasternsun, Florian Vogt, Elias Daler, Daniel Larsson, Cholerae Hu, ddibiasi, Lee, polynomialspace, Matan Hafuta and 25 more
Reacted by Public Profile, Xargin, Josef Fröhle, sanksons, Gyllsdorff, xuyang2, Luis Gabriel Gómez, temprory, Derek Perkins, Jodi Ivan Lumbantoruan and 3 more
I agree that the README should be updated to convey which parts are not compatible with encoding/json and not say "100% compatible". There are a couple functions missing from the Decoder type:
I had wanted to try out switching to json-iterator/go, but our code currently depends on these functions for one of our packages that does stream processing of documents and I was surprised to find them missing given the claim of drop-in compatibility.
Reacted by Andrei Dascalu, GalvinGao, Matan Hafuta, Saif Ali Khan, Vladislav Yarmak, Big Phil, bittrainee, Mahmudur Rahman, Terence, Furkan Türkal and 1 more
Activity
[-]Missing Compact/Indent/HTMLEscape comparing to encoding/json[/-][+]json-iterator/go is not 100% compatible drop-in replacement of encoding/json[/+]taowen commentedon Jan 28, 2018
no one is asking for them
veqryn commentedon Jul 23, 2018
HTML Escaping is supported through the following, I think:
carbocation commentedon Aug 6, 2018
The readme says "100% compatibility with standard lib". I think that if this line were removed, this issue could be resolved...
shatil commentedon Oct 20, 2018
#313 relates to this.
jsoniterdoesn't support theUmarshalerinterface: https://golang.org/pkg/encoding/json/#Unmarshalerjszwedko commentedon Apr 13, 2020
I agree that the README should be updated to convey which parts are not compatible with
encoding/jsonand not say "100% compatible". There are a couple functions missing from theDecodertype:I had wanted to try out switching to
json-iterator/go, but our code currently depends on these functions for one of our packages that does stream processing of documents and I was surprised to find them missing given the claim of drop-in compatibility.Dentrax commentedon Apr 18, 2023
Any updates on this? I'm asking. 👋 I'm just hit this issue. 🙈
damnever commentedon May 5, 2023
Another issue: #657
CHN-STUDENT commentedon Sep 27, 2024
Hey,how can i export '&' char on my json by using json-iterator,could every one give me advice?