<html><head><meta http-equiv="Content-Type" content="text/html charset=us-ascii"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class=""><div><blockquote type="cite" class=""><div class="">On Apr 15, 2016, at 1:29 AM, Milos Rankovic &lt;<a href="mailto:milos@milos-and-slavica.net" class="">milos@milos-and-slavica.net</a>&gt; wrote:</div><div class=""><div style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class=""><blockquote type="cite" class=""><div class="">On 15 Apr 2016, at 03:22, John McCall &lt;<a href="mailto:rjmccall@apple.com" class="">rjmccall@apple.com</a>&gt; wrote:</div></blockquote></div></div></blockquote></div><div><blockquote type="cite" class=""><div class=""><div style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class=""><div class=""><blockquote type="cite" class=""><div class="">Your JSON literal example is already pretty well modeled by simply making a JSONValue type that conforms to all the literal protocols. &nbsp;It is completely unclear why you would even want to model this with some generic Tree structure.&nbsp;</div></blockquote>Because JSON has the structure of a tree. &nbsp;A dictionary of the type `[String:AnyObject]` does not express that structure even if at run-time it turns out that some of those any-objects are themselves dictionaries. `Tree&lt;String, JSONValue&gt;`, in contrast, precisely expresses the structure of JSON objects.</div></div></div></blockquote><div><br class=""></div>No, it's actually a very strange way to model it. &nbsp;The JSONValue type needs to be able to embed both JSON arrays and JSON objects, so if you represent a JSON object as a DictionaryTree&lt;String, JSONValue&gt;, you'll end up with two different ways to represent { "x" : { "y" : 1 } }. &nbsp;It's much better to use the "flat" representation of Dictionary&lt;String, JSONValue&gt; and allow the JSONValue enum's natural recursiveness to express nested objects.</div><div><br class=""></div><div>John.</div></body></html>