<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic JSON parsing in Alfresco Javascript in Alfresco Archive</title>
    <link>https://connect.hyland.com/t5/alfresco-archive/json-parsing-in-alfresco-javascript/m-p/169272#M122674</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Greetings I just read all the posts about JSON, but hope to clarify something. I need to parse JSON on the server side in my Web Client javascript. I was able to import this script &lt;/SPAN&gt;&lt;A href="http://www.json.org/json_parser.js" rel="nofollow noopener noreferrer"&gt;http://www.json.org/json_parser.js&lt;/A&gt;&lt;SPAN&gt; and call the json_parse function like below. This is an implementation that does not eval() the json, which is better security -wise obviously. The appending of the empty string apparently converts the object type into a javascript string, which is then parse able by the function. Otherwise it fails.&lt;/SPAN&gt;&lt;BR /&gt;&lt;PRE class="language-none line-numbers"&gt;&lt;CODE&gt;var sJSON = oChild.content + "";&lt;BR /&gt;var oJSON = json_parse(sJSON);&lt;SPAN class="line-numbers-rows"&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/CODE&gt;&lt;/PRE&gt;&lt;SPAN&gt;My question is :doesn't Rhinoscript provide a built-in way to parse and stringify JSON ? I read in another post about Rhino's toSource() method, however didn't really understand the intended use. Thanks in advance .&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;(Alf 2.1.3E)&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 14 Aug 2008 17:41:19 GMT</pubDate>
    <dc:creator>alrice</dc:creator>
    <dc:date>2008-08-14T17:41:19Z</dc:date>
    <item>
      <title>JSON parsing in Alfresco Javascript</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/json-parsing-in-alfresco-javascript/m-p/169272#M122674</link>
      <description>Greetings I just read all the posts about JSON, but hope to clarify something. I need to parse JSON on the server side in my Web Client javascript. I was able to import this script http://www.json.org/json_parser.js and call the json_parse function like below. This is an implementation that does not</description>
      <pubDate>Thu, 14 Aug 2008 17:41:19 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/json-parsing-in-alfresco-javascript/m-p/169272#M122674</guid>
      <dc:creator>alrice</dc:creator>
      <dc:date>2008-08-14T17:41:19Z</dc:date>
    </item>
    <item>
      <title>Re: JSON parsing in Alfresco Javascript</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/json-parsing-in-alfresco-javascript/m-p/169273#M122675</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Although since Rhinoscript has this automatic Java bridging, I can call a function to parse JSON in Java , and return a JSONObject. The syntax is different to access the data on the javascript&amp;nbsp; side , but the parsing is 50x to 100x faster in Java!!! I like the flexibility.&amp;nbsp; &lt;img id="smileyvery-happy" class="emoticon emoticon-smileyvery-happy" src="https://connect.hyland.com/i/smilies/16x16_smiley-very-happy.png" alt="Smiley Very Happy" title="Smiley Very Happy" /&gt;&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 14 Aug 2008 20:38:19 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/json-parsing-in-alfresco-javascript/m-p/169273#M122675</guid>
      <dc:creator>alrice</dc:creator>
      <dc:date>2008-08-14T20:38:19Z</dc:date>
    </item>
  </channel>
</rss>

