简体   繁体   English

将Json加入Flex Flash Builder Mobile的列表中

[英]getting Json in to a list in flex flash builder mobile

I using Flash builder 4.5 and calling my own webservice which return a json with four fields, but many records. 我使用Flash Builder 4.5并调用了我自己的Web服务,该服务返回一个包含四个字段但记录很多的json。

I use the Data/Service to create the service and when I use the "Test Operation" I get the first record with the four fields, if I change to raw view I see five records. 我使用数据/服务创建服务,当我使用“测试操作”时,我获得了包含四个字段的第一条记录,如果更改为原始视图,则会看到五个记录。

My problem when I bind it to a list I only get the first record, regardless if I return the result as an array or arraycollection. 我将其绑定到列表时遇到的问题是,无论将结果作为数组还是arraycollection返回,我都只会获得第一条记录。 I have a Data Type called NoName1 which have four fields. 我有一个名为NoName1的数据类型,它具有四个字段。

My question is how to get the result from a json into a list,the way I do it now will only show the first record in the list. 我的问题是如何将json中的结果获取到列表中,我现在将只显示列表中的第一条记录。

Thanks, Kim 谢谢金

  <s:CallResponder id="Operation1Result" result="Operation1Result.lastResult as NoName1"/>

要解码JSON,您可以使用as3corelib

Flash builder 4.5.1 takes care of the deserializing of the json. Flash Builder 4.5.1负责json的反序列化。 I found the problem, the json from the website was not formatted corretly 我发现了问题,网站上的json没有正确格式化

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM