<?xml version="1.0" encoding="UTF-8"?><!-- generator="wordpress/2.1.3" -->
<rss version="2.0" 
	xmlns:content="http://purl.org/rss/1.0/modules/content/">
<channel>
	<title>Comments on: Using JSON with StringTemplate</title>
	<link>http://hardlikesoftware.com/weblog/2006/12/12/using-json-with-stringtemplate/</link>
	<description>The writings of John Snyders, mostly about software.</description>
	<pubDate>Thu, 11 Mar 2010 15:37:09 +0000</pubDate>
	<generator>http://wordpress.org/?v=2.1.3</generator>

	<item>
		<title>By: Jeyaram</title>
		<link>http://hardlikesoftware.com/weblog/2006/12/12/using-json-with-stringtemplate/#comment-7017</link>
		<author>Jeyaram</author>
		<pubDate>Thu, 05 Jun 2008 09:22:02 +0000</pubDate>
		<guid>http://hardlikesoftware.com/weblog/2006/12/12/using-json-with-stringtemplate/#comment-7017</guid>
					<description>Dear John,

I just came across your blog when looking for using JSON with StringTemplate.

Would it be possible for you to share your changes to org.json with me?

Thank you

Regards
Jeyaram</description>
		<content:encoded><![CDATA[<p>Dear John,</p>
<p>I just came across your blog when looking for using JSON with StringTemplate.</p>
<p>Would it be possible for you to share your changes to org.json with me?</p>
<p>Thank you</p>
<p>Regards<br />
Jeyaram</p>
]]></content:encoded>
				</item>
	<item>
		<title>By: John Snyders</title>
		<link>http://hardlikesoftware.com/weblog/2006/12/12/using-json-with-stringtemplate/#comment-7076</link>
		<author>John Snyders</author>
		<pubDate>Tue, 10 Jun 2008 01:51:23 +0000</pubDate>
		<guid>http://hardlikesoftware.com/weblog/2006/12/12/using-json-with-stringtemplate/#comment-7076</guid>
					<description>Hi Jeyarm, I added a link to the source zip to the main page. &lt;a href="http://hardlikesoftware.com/weblog/json-for-st/" rel="nofollow"&gt;JSON for ST&lt;/a&gt;

Enjoy</description>
		<content:encoded><![CDATA[<p>Hi Jeyarm, I added a link to the source zip to the main page. <a href="http://hardlikesoftware.com/weblog/json-for-st/" rel="nofollow">JSON for ST</a></p>
<p>Enjoy</p>
]]></content:encoded>
				</item>
	<item>
		<title>By: Jeyaram</title>
		<link>http://hardlikesoftware.com/weblog/2006/12/12/using-json-with-stringtemplate/#comment-7078</link>
		<author>Jeyaram</author>
		<pubDate>Tue, 10 Jun 2008 02:19:33 +0000</pubDate>
		<guid>http://hardlikesoftware.com/weblog/2006/12/12/using-json-with-stringtemplate/#comment-7078</guid>
					<description>Thank you very much for sharing it.

FYI, I have tried using Json-Lib http://json-lib.sourceforge.net/ that implements Map and other collection interfaces. It seems to be working fine with ST but depends on more libraries. 

Regards
Jeyaram</description>
		<content:encoded><![CDATA[<p>Thank you very much for sharing it.</p>
<p>FYI, I have tried using Json-Lib <a href="http://json-lib.sourceforge.net/" rel="nofollow">http://json-lib.sourceforge.net/</a> that implements Map and other collection interfaces. It seems to be working fine with ST but depends on more libraries. </p>
<p>Regards<br />
Jeyaram</p>
]]></content:encoded>
				</item>
	<item>
		<title>By: I82Much</title>
		<link>http://hardlikesoftware.com/weblog/2006/12/12/using-json-with-stringtemplate/#comment-39322</link>
		<author>I82Much</author>
		<pubDate>Thu, 07 Jan 2010 22:27:35 +0000</pubDate>
		<guid>http://hardlikesoftware.com/weblog/2006/12/12/using-json-with-stringtemplate/#comment-39322</guid>
					<description>Hi John,

I'm very interested in this project, and am attempting to use it to do some code generation.

My question is, is it possible to have lists of key value pairs and access them via st?

For instance,

{
"variables":[
    {
      "type":"int",
      "name":"Hello",
      "enumeratedValues":{
        "TEST":0,
        "TEST2":1,
        "TEST3":2
      }
    },
    {
      "type":"double",
      "name":"PI"
    }
  ]
} 


I want to be able to loop over all of my variables, and if they have a set of enumerated values, access them and print that set of key/value pairs.  I can't figure out how to do this.  Any tips?

Thanks,

Nick</description>
		<content:encoded><![CDATA[<p>Hi John,</p>
<p>I&#8217;m very interested in this project, and am attempting to use it to do some code generation.</p>
<p>My question is, is it possible to have lists of key value pairs and access them via st?</p>
<p>For instance,</p>
<p>{<br />
&#8220;variables&#8221;:[<br />
    {<br />
      &#8220;type&#8221;:&#8221;int&#8221;,<br />
      &#8220;name&#8221;:&#8221;Hello&#8221;,<br />
      &#8220;enumeratedValues&#8221;:{<br />
        &#8220;TEST&#8221;:0,<br />
        &#8220;TEST2&#8243;:1,<br />
        &#8220;TEST3&#8243;:2<br />
      }<br />
    },<br />
    {<br />
      &#8220;type&#8221;:&#8221;double&#8221;,<br />
      &#8220;name&#8221;:&#8221;PI&#8221;<br />
    }<br />
  ]<br />
} </p>
<p>I want to be able to loop over all of my variables, and if they have a set of enumerated values, access them and print that set of key/value pairs.  I can&#8217;t figure out how to do this.  Any tips?</p>
<p>Thanks,</p>
<p>Nick</p>
]]></content:encoded>
				</item>
	<item>
		<title>By: I82Much</title>
		<link>http://hardlikesoftware.com/weblog/2006/12/12/using-json-with-stringtemplate/#comment-39323</link>
		<author>I82Much</author>
		<pubDate>Thu, 07 Jan 2010 22:28:07 +0000</pubDate>
		<guid>http://hardlikesoftware.com/weblog/2006/12/12/using-json-with-stringtemplate/#comment-39323</guid>
					<description>http://pastebin.com/f383c5537</description>
		<content:encoded><![CDATA[<p><a href="http://pastebin.com/f383c5537" rel="nofollow">http://pastebin.com/f383c5537</a></p>
]]></content:encoded>
				</item>
	<item>
		<title>By: I82Much</title>
		<link>http://hardlikesoftware.com/weblog/2006/12/12/using-json-with-stringtemplate/#comment-39342</link>
		<author>I82Much</author>
		<pubDate>Fri, 08 Jan 2010 20:48:36 +0000</pubDate>
		<guid>http://hardlikesoftware.com/weblog/2006/12/12/using-json-with-stringtemplate/#comment-39342</guid>
					<description>Looks like I figured it out on my own.

Let $vars$ be the map of key value pairs you want to iterate over.  Then all you need to do is

$vars.keys, vars.values: { k, v &#124; $k$ : $v$ }$

Awesome!

Thanks for the amazing tool.</description>
		<content:encoded><![CDATA[<p>Looks like I figured it out on my own.</p>
<p>Let $vars$ be the map of key value pairs you want to iterate over.  Then all you need to do is</p>
<p>$vars.keys, vars.values: { k, v | $k$ : $v$ }$</p>
<p>Awesome!</p>
<p>Thanks for the amazing tool.</p>
]]></content:encoded>
				</item>
</channel>
</rss>
