Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

.NET JSON parser methodology #25

Open
daiplusplus opened this issue Nov 9, 2019 · 1 comment
Open

.NET JSON parser methodology #25

daiplusplus opened this issue Nov 9, 2019 · 1 comment

Comments

@daiplusplus
Copy link

daiplusplus commented Nov 9, 2019

Newtonsoft.Json can parse JSON in different ways, both with and without using a String representation and this will give you different results (e.g. a String cannot exceed 1,073,741,824 characters (due to the 2GiB single object size limit and the fact String always uses UTF-16) so that's an upper-limit when using JsonConvert.DeserializeObject<T>(String) but you should be able to read an input stream exceeding that limit using JsonTextReader and passing that into DeserializeObject.

Additionally, the first-party JSON parser that shipped with WCF 3.5 ( System.Runtime.Serialization.Json is built on the XML parser, which means it inherits the configurable nested object depth-limit - and I've seen this is not well understood in the .NET community - so just throwing that out there.

@lovasoa
Copy link
Owner

lovasoa commented Nov 9, 2019

That is very interesting, thank you! Would you be interested in adding .net to our travis CI so that we can test these two parsers?

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

No branches or pull requests

2 participants