Skip to content
This repository has been archived by the owner on May 16, 2022. It is now read-only.

** Critical bug: Unicode Character doesn't serialize properly \u0003 #224

Open
penguinawesome opened this issue Jun 16, 2020 · 4 comments
Open

Comments

@penguinawesome
Copy link

We have just found out that this end of text unicode character: \u0003 doesn't serialize properly in string causing the front end to crash and saying that the json is incorrect or in a malformed state (we are using the angularjs). I compare the values being serialize in newtonsoft versus utf8json and in newtonsoft, they serialize it as \u0003 not the string literal that is why its working.

Here is the output in utf8json (raw response):

image

And here is the output in newtonsoft (raw response):

image

@penguinawesome
Copy link
Author

We are experiencing this issue in serializing the response from .net framework web api -> MediaTypeFormatter

image

@st-gwerner
Copy link

Does Pull Request #217 work for you? I had to implement a fix for this because of a similar issue. If you want to quickly test my fork on your code to see if it works for you, you can get it from https://github.com/st-gwerner/Utf8Json

If it works, I'd also strongly suggest merging it to this repo

@penguinawesome
Copy link
Author

penguinawesome commented Jun 25, 2020

@st-gwerner hey thanks! Yea it works! Btw, when building your fork version to generate the Library DLL, do i need to set it to release mode? Do you have a plan on maintaining that fork version repo? I hope you could add them on nuget. It looks like the main author of this library is not active anymore and yes i highly suggest that this PR should be merged with this Main Repo.

@Temtaime
Copy link

Temtaime commented Jul 9, 2020

@neuecc @neon-izm please, fix this issue, or i'd go with another library, nobody wants patching the library at their own and deploy it.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants