0 Replies Latest reply on Aug 15, 2013 4:31 AM by heidi defense

    Seam 2 automatically putting double quote on JSON object's arrayJSON.

    heidi defense Newbie

      Hello guys,

       

           I really wonder why Seam2 automatically putting double quote on arrayJSON(bold below application.js) inside JSON-value-pair(bold below home.xhtml).

       

           Could there be a way to escape this one? Those double quotes outside, because it's making arrayJSON a string but not array.

       

      filename: application.js

      fileControls = {};

      fileControls.downloadFile = function (el) {

       

               transferSpec = {

                   "paths": [ { "source" : "tinyfile0001" } ]

           };

       

      document.getElementById('transfer_spec').innerHTML=JSON.stringify(transferSpec,null," ");

      };

       

       

      displaying: home.xhtml

      {

          "paths": "[ { \"source\":\"tinyfile0001\" } ]"

      }

       

       

       

      -Thanks.