0

我们如何在 Eclipse 中包含 json 格式数据?

请看下面

String responserecivied ="{"dummyuser":{"Number":1,"CUSID":1}}";

当我在 Eclipse 中包含上述内容时,我收到编译错误

它在标记上显示语法错误,删除这些标记

请告诉我如何将它包含在 Eclipse 中。

4

2 回答 2

1

您可以在 Eclipse 中设置一个首选项,以便更轻松地粘贴到文本中

在此处输入图像描述

于 2012-10-27T18:41:30.033 回答
0

你需要转义你的双引号

 String responserecivied ="{\"dummyuser\":{\"Number\":1,\"CUSID\":1}}";
于 2012-10-27T18:32:09.647 回答