JSON可以容纳多少数量有限制吗? [英] Is there a limit on how much JSON can hold?
问题描述
我正在将jquery,JSON和AJAX用于注释系统.我很好奇,可以通过JSON发送/存储的内容是否有大小限制?就像用户输入大量内容并通过JSON发送一样,是否存在某种最大限制?
I am using jquery, JSON, and AJAX for a comment system. I am curious, is there a size limit on what you can send through/store with JSON? Like if a user types a large amount and I send it through JSON is there some sort of maximum limit?
也可以通过JSON发送任何类型的文本.例如,有时我允许用户使用html,这样可以吗?
Also can any kind of text be sent through JSON. for example sometime I allow users to use html, will this be ok?
推荐答案
JSON与其他数据格式(如XML)相似-如果需要传输更多数据,则只需发送更多数据. JSON请求没有固有的大小限制.服务器将通过解析请求来设置任何限制. (例如,ASP.NET具有序列化程序的"MaxJsonLength"属性.)
JSON is similar to other data formats like XML - if you need to transmit more data, you just send more data. There's no inherent size limitation to the JSON request. Any limitation would be set by the server parsing the request. (For instance, ASP.NET has the "MaxJsonLength" property of the serializer.)
这篇关于JSON可以容纳多少数量有限制吗?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!