我现在有这样一个json字符串如下
[{"ContactAppend":{"Nickname":"wuday","Address":"海区","Company":"凯 凯","Cid":1},"Email":"wudi@163.com","Phone":"18988888888","Name":"wuday11","Id":1}]
想要格式化成如下的格式
[{"Nickname":"wuday","Address":"海区","Company":"凯凯","Cid":1,"Email":"wudi@163.com","Phone":"18988888888","Name":"wuday11","Id":1}]
应该怎么你弄啊?请各位大侠多多指教
你前面定义的ContactAppend应该是一个类的对象吧?你把那个类的对象去掉,把后面的Nickname、Company等字段放到需要返回的Json 类字段中就行。
ContactAppend是一张附加表,没办法改的,不过可以照着你的思路以别的方式做,谢谢
直接改字符串不行吗?