title: parse Json to XML in Flex 4
body: <p>I'm making a small project in flex(flash builder 4.5) where the user can search for books. At the moment I can get books (im using google books api) but I receive it as JSON format.</p>
  
  <p>I would like to get this in xml instead so i can show a few fields in a datagrid. </p>
  
  <p>So far I've downloaded the as3corelib and linked that to my project. But I cant figure out how to Decode the JSON. <a href="https://www.googleapis.com/books/v1/volumes?q=cat" rel="nofollow">JSON example</a></p>
  
  <pre><code>&lt;?xml version="1.0" encoding="utf-8"?&gt;
  &lt;s:WindowedApplication xmlns:fx="http://ns.adobe.com/mxml/2009" 
                     xmlns:s="library://ns.adobe.com/flex/spark" 
                     xmlns:mx="library://ns.adobe.com/flex/mx"
                     creationComplete="application1_creationCompleteHandler(event)"
                     &gt;
  &lt;fx:Script&gt;
      &lt;![CDATA[
          import com.adobe.serialization.json.JSON;
  
          import mx.controls.Text;
          import mx.events.FlexEvent;
          import mx.rpc.events.ResultEvent;
          [Bindable] private var api_request:String;
  
          import com.adobe.serialization.json.JSONDecoder;
  
  
          protected function application1_creationCompleteHandler(event:FlexEvent):void
          {
              // TODO Auto-generated method stub
              btnSearch.addEventListener(MouseEvent.CLICK, Zoek);
          }
  
          protected function Zoek(event:MouseEvent):void
          {
              // TODO Auto-generated method stub
              var api_url:String='https://www.googleapis.com/books/v1/volumes?q=';
              var api_tag:String=search.text;
  
              api_request= api_url + api_tag
  
              GoogleBooks.send(); 
  
  
          }
  
          protected function GoogleBooks_resultHandler(event:ResultEvent):void
          {
  
              txtResult.text=event.result as String;
              //JSONDecoder(txtResult.text);
  
          }
  
      ]]&gt;
  &lt;/fx:Script&gt;
  &lt;fx:Declarations&gt;
      &lt;s:HTTPService id="GoogleBooks" url="{api_request}" resultFormat="text" result="GoogleBooks_resultHandler(event)" /&gt;
  
  
  &lt;/fx:Declarations&gt;
  &lt;s:Button x="175" y="40" label="Button" id="btnSearch"/&gt;
  &lt;s:TextInput x="26" y="38" id="search"/&gt;
  
  &lt;s:TextArea id="txtResult" x="32" y="112" width="539" height="312"/&gt;
  &lt;/s:WindowedApplication&gt;
  </code></pre>
  
  <p><strong>so my question is: How can i decode the JSON so i can see xml in my Textarea?</strong> </p>