JSON 可以容纳的数量是否有限制? [英] Is there a limit on how much JSON can hold?

查看:67
本文介绍了JSON 可以容纳的数量是否有限制?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我将 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屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆