<pre>&gt; Strict json has a dictionary as it&#39;s outermost object.<br><br>I don&#39;t think this is true. I was not sure so I checked the spec : <a href="http://www.ietf.org/rfc/rfc4627.txt?number=4627">http://www.ietf.org/rfc/rfc4627.txt?number=4627</a><br>
and apparently a valid json string is either an array or an object.<br><br>&gt; Most parsers will accept an array as you have done, but not all (Obj-C&#39;s TouchJSON as an example)<br><br>TouchJSON&#39;s says (<a href="https://github.com/TouchCode/TouchJSON#invalid-json">https://github.com/TouchCode/TouchJSON#invalid-json</a>) :<br>
&quot;If you think your JSON is valid but TouchJSON is failing to process it correctly, use the online JSON lint tool to validate your JSON:
<a href="http://www.jsonlint.com/">http://www.jsonlint.com/</a> &quot;<br><br>And it turns out, jsonlint accepts json with an array as outermost element.<br>Personally, I&#39;ve always used an array, and many API libraries that I am using for web development return an array as outermost element.<br>
<br>&gt; About the optional GUI, my opinion is that pd is firstly a graphical data flow language existing of canvases and objects with specific location.<br><br>Once again (sorry :) I disagree ... True, &quot;pd is firstly a graphical data flow language&quot;.<br>
However, times they are a changing, and libpd is becoming more and more important, and will probably continue to grow.<br>Also, I might be wrong, but I am guessing nobody would disagree that it is a good idea to go towards a better separation between pd core and its GUI.<br>
When you specify something new, it is a good occasion to do things well and clean. Passing over some legacy stuff to a new specification you are writing kind of kills the purpose of making a new specification.<br><br>For all those reasons, I think it is a good idea to specify a minimalist file format that doesn&#39;t include GUI infos.<br>
Of course, it should include special placeholders for putting extra info (where GUI info can be put).<br>And as a new parser will have to be written anyways, it is not much extra-work to handle missing attributes that are not mandatory in the spec.<br>
<br>For example, if I take the example I had given before :<br><br><i>[
</i><i>   {&quot;class&quot;: &quot;obj&quot;, &quot;id&quot;: 0, &quot;type&quot;: &quot;osc~&quot;, &quot;args&quot;: [440]},
</i><i>   {&quot;class&quot;: &quot;obj&quot;, &quot;id&quot;: 1, &quot;type&quot;: &quot;dac~&quot;},
</i><i>   {&quot;class&quot;: &quot;connect&quot;, &quot;from&quot;: [0, 0], &quot;to&quot;: [1, 0]},
</i><i>   {&quot;class&quot;: &quot;connect&quot;, &quot;from&quot;: [0, 0], &quot;to&quot;: [1, 1]}
</i><i>]</i><br><br>// start parsing, in pseudo-code<br>foreach element in element_list {<br>    if (element.class is &quot;obj&quot;) {<br>        obj = create_new_obj_with_type_and_args(element)<br>        if (has_display_infos(element)) {<br>
            set_object_display(obj, element)<br>        } else {<br>            set_default_display(obj)<br>        }<br>    }<br>    // ...<br>}<br><br>what I mean is that the core specified should be small : objects, connections, data ; and if a particular program (pd, libpd, ...) using this format wants to add extra-info, it should handle the case where those infos are not available when parsing.<br>
Or at least, that&#39;s my opinion :)<br></pre>