neuecc / Utf8Json

Definitely Fastest and Zero Allocation JSON Serializer for C#(NET, .NET Core, Unity, Xamarin).
MIT License
2.35k stars 266 forks source link

Control characters serialization fix #217

Open st-gwerner opened 4 years ago

st-gwerner commented 4 years ago

This PR is to fix an the issue https://github.com/neuecc/Utf8Json/issues/78, Invalid serialization of control characters. JsonWriter now detects and encodes all control characters from 0x00 to 0x1F correctly in the output stream.

Various unit tests were added to confirm the behavior.

Temtaime commented 4 years ago

@neon-izm @neuecc Merge this, please