title: how to use httpservice to request&response json data from mobile(client) to server in flash builder 4.5?
body: <p>Firstly i share my code that it is right.</p>
  
  <p><img src="https://i.stack.imgur.com/IYxMV.jpg" alt="enter image description here">
      
          
      </p>
  
  <pre><code>[Bindable]
          private var myArrayCollection:ArrayCollection;
  
  private function serviceSend():void
          {
              var header:Object = new Object();
              header["Accept"] = "application/json";
  
              loginService.headers = header;
              loginService.contentType = "application/json";
              loginService.send()
          }
  
  private function initRequest():String
          {
              jsonStr = '{"loginRequest":{"userId":"300002918","password":"ibnkcn13","language":"zh_CN"},"requestHeader":{"clientContext":{"country":"CN","channel":"IPHONE","userName":"iphoneuser","password":"password"},"serviceContext":{"serviceId":"serviceId","token":"","nonce":""},"userContext":{"userId":"sdffff","sessionId":"fsdfsdf","language":"zh_CN"}}}';       
  
              return jsonStr;
          }
  
  private function onJSONResult():void
          {
               responseData = loginService.lastResult.toString();
  
              //loginService.resultFormat.toString();
  
              //responseData = responseData.replace( /\s/g, ''); 
  
              txt.visible=true;
              txt.text=responseData;
              trace(responseData);
  
              //var jd:JSONDecoder = new JSONDecoder( responseData , false);
  
              var obj:Object = JSON.decode(responseData);
  
  
              //var arr:Array = (JSON.decode(responseData) as Array);
              myArrayCollection = new ArrayCollection;
  
              var obj1:Object = new Object;
              obj1.customerName1 = obj.loginResponse.login.customerName1;
              obj1.customerName2 = obj.loginResponse.login.customerName2;
  
  
              myArrayCollection.addItem(obj1);
  
          }
  
  &lt;s:Panel visible="true" width="100%" height="100%"
                   title="HTTPService"&gt;
              &lt;s:DataGrid id="dgPosts1" width="100%" height="100%"
                          dataProvider="{myArrayCollection}"&gt;
                  &lt;s:columns&gt;
                          &lt;s:ArrayList&gt;
                              &lt;s:GridColumn dataField="customerName2"
                                            headerText="customerName2"/&gt;
                              &lt;s:GridColumn dataField="customerName1"
                                            headerText="customerName1"/&gt;
                      &lt;/s:ArrayList&gt;
                  &lt;/s:columns&gt;
              &lt;/s:DataGrid&gt;
          &lt;/s:Panel&gt; 
  </code></pre>
  
  <p>Then, i want to know how to parse every value of json data in a easy way ?
  i want to parse these json data like this and how to do
  <img src="https://i.stack.imgur.com/xqs0k.jpg" alt="enter image description here">
  just like:</p>
  
  <pre><code>var jd:JSONDecoder = new JSONDecoder( responseData , false);
  dgPosts1.dataProvider = jd as ArrayCollection;
  
  &lt;s:DataGrid id="dgPosts1" width="100%" height="100%"
                          dataProvider="{myArrayCollection}"&gt;
                  &lt;s:columns&gt;
                      &lt;json:JSONDecoder&gt;
                          &lt;json:id&gt;
                                                         ...................
                          &lt;/json:id&gt;
                      &lt;/json:JSONDecoder&gt;
  </code></pre>
  
  <p>the code is failed. i want to know how to use the  in datagrid to parse the json dataprovider?
  thanks a lot.</p>