JSON - 是否有任何XML CDATA等价物? [英] JSON - is there any XML CDATA equivalent?

查看:1209
本文介绍了JSON - 是否有任何XML CDATA等价物?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在寻找一种方式,json解析将按原样获取信息(就好像它是CDATA) - 而不是尝试序列化它。
我们同时使用.net和java(客户端和服务器) - 所以答案应该是关于JSON结构
有没有办法实现这种结构?

I'm looking for a way that json parsing will take information as is (as if it was CDATA) - and not to try to serialize that. We use both .net and java (client and server) - so the answer should be about JSON structure Is there any way to achieve this structure?

谢谢。

推荐答案

JSON中没有XML CDATA等效项。但您可以使用类似base64的字符串对字符串文字进行编码。有关详细信息,请参见此问题

There is no XML CDATA equivalent in JSON. But you can encode your message in a string literal using something like base64. See this question for more details.

这篇关于JSON - 是否有任何XML CDATA等价物?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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