采用序列化json.net大小限制的数据?大小、序列化、数据、net

2023-09-02 10:38:53 作者:虚伪的爱,不要也罢

我已经开发了一个asp.net web应用程序,并开始使用内置的JavaScript序列化序列化的一些数据,以一个JSON字符串。这成为问题,因为我发现以后,有关​​于数据的我能够序列化量的问题。我使用JSON JavaScriptSerializer一直得到错误序列化和反序列化过程。字符串的长度超过上maxJsonLength属性设置的值。这是迅速修复使用json.net序列化/反序列化我的数据。这意味着,无论有使用json.net就当是没有preset的最大尺寸序列化/反序列化或有一个限制,它比所使用的javascriptserializer更高

I have developed an asp.net web application and initially serialized some data to a json string using the built in javascript serializer. This became problematic as I discovered later on that there was an issue about the amount of data I was able to serialize. I kept getting ""Error during serialization or deserialization using the JSON JavaScriptSerializer. The length of the string exceeds the value set on the maxJsonLength property". This was quickly fixed by using json.net to serialize /deserialize my data. This implied that either there is no preset maximum size when using json.net to serialize /deserialize or that there is a limit that's higher than that used by javascriptserializer.

我的问题是相当简单的。我会遇到一个类似的问题在未来关于序列化时/反序列化使用json.net容量大小?即是否有大小限制使用json.net序列数据或者我可以假设有没有极限,我的程序应该是细如数据库的大小增加时?我问这个问题上json.net的论坛bbut还没有收到回音。我希望这里有人知道答案。提前致谢。

My question is rather straightforward. Will I run into a similar issue in the future regarding size capacity when serializing /deserializing using json.net? i.e Is there a size limit when serializing data using json.net or can I assume there is no limit and my program should be fine as the size of the database increases? I asked this question on json.net's discussion forum bbut havent heard back. I'm hoping someone here knows the answer. Thanks in advance.

推荐答案

有没有人为的限制。

另外,内部Json.NET读取和写入过流,所以也没有内存限制,无论是。

Also internally Json.NET reads and writes over streams so there is no memory limit either.