0

我会解析 JSON

JSONObject json = jParser.getJSONFromUrl();
        json.toString();

在调试“json.toString()”时,我看不到整行,因为行太长

事实证明,与此类似的东西

"{"VehiclePartItems":[],"BrandItems":[],"TabletSurveyTasksItems":[{"Brand":"Infiniti","ShippingAgentNativeName":"ÐÐТÐ-13061","Model":"FX37","SecondDriverShortNativeName":null,"ShippingAgentUnitId":"3700bc0b-17cc-47c9-8bca-cd78a258a592","FirstDriverEnglishName":"Saranchuk Viktor Vasyliovych","Vin":"JN1TCNS51U0442875","FirstDriverShortNativeName":"СаÑанÑÑк Ð. Ð.","SecondDriverNativeName":"  ","SurveyPointNativeName":"ТеÑмÑнал ÐвÑологÑÑÑика","RowState":2,"TruckPlateNumber":"AA1939HE","FirstDriverNativeName":"СаÑанÑÑк ÐÑкÑÐ¾Ñ ÐаÑилÑовиÑ","ReportNumber":"2011\/640758","CarrierNativeName":"ÐÐТÐ-13061","RowVer":[0,0,0,0,1,160,127,245],"SurveyPointUnitId":"62e12548-0a68-4999-960b-a3bb3c44675c","SecondDriverShortEnglishName":null,"ShippingAgentEnglishName":"KATP-13061 PJSC","SecondDriverEnglishName":"  ","CarrierEnglishName":"KATP-13061 PJSC","TrailerPlateNumber":"AA9774XP","CarrierUnitId":"3700bc0b-17cc-47c9-8bca-cd78a258a592","Id":"3341661f-8a70-4a8f-b7b0-..."

我怎样才能看到所有的内容?

4

3 回答 3

2

在调试期间右键单击文本区域Eclipse并选择Max length...Wrap text可能也有帮助)。

在此处输入图像描述

于 2012-10-10T18:59:21.843 回答
0

大多数 IDE.toString()在调试时使用变量的方法。使用 Eclipse 启动调试工具(运行图标旁边的绿色错误图标)并在代码行上方的json.toString();Then mouse howler to jsonvariable 处放置一个断点。

希望能帮助到你!

于 2012-10-10T18:58:13.473 回答
0

使用 eclipse 提供的变量选项卡。此选项卡在调试透视图中可见。如果你看不到它然后转到 windows-show view-variables

这里查看

于 2012-10-10T19:21:46.700 回答