【发布时间】:2013-02-18 17:57:11
【问题描述】:
我需要将对象的 String 属性序列化为嵌套 JSON 而不进行任何转义等。所以给定 json:
{
"regularProperty" : "Test here",
"nestedJSON" : {
"propertyArray" : [1,2,3],
"propertyText" : "new Text",
"anotherObject" : { ... }
}
}
并且 nestedJSON 属性必须包含文本
{
"propertyArray" : [1,2,3],
"propertyText" : "new Text",
"anotherObject" : { ... }
}
如何实现序列化/反序列化?任何特定的注释或数据类型?
【问题讨论】: