<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
		>
<channel>
	<title>Comments on: New on edge Rails: JSON serialization of ActiveRecord objects reaches maturity</title>
	<atom:link href="http://blog.codefront.net/2007/10/10/new-on-edge-rails-json-serialization-of-activerecord-objects-reaches-maturity/feed/" rel="self" type="application/rss+xml" />
	<link>http://blog.codefront.net/2007/10/10/new-on-edge-rails-json-serialization-of-activerecord-objects-reaches-maturity/</link>
	<description>Rails, Firefox, Anime, Mac</description>
	<lastBuildDate>Fri, 05 Mar 2010 23:29:45 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.2</generator>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
		<item>
		<title>By: The Irish Penguin &#187; Blog Archive &#187; Quick Example of Serialisation via to_json in Ruby On Rails</title>
		<link>http://blog.codefront.net/2007/10/10/new-on-edge-rails-json-serialization-of-activerecord-objects-reaches-maturity/comment-page-1/#comment-649611</link>
		<dc:creator>The Irish Penguin &#187; Blog Archive &#187; Quick Example of Serialisation via to_json in Ruby On Rails</dc:creator>
		<pubDate>Sat, 21 Jun 2008 13:28:25 +0000</pubDate>
		<guid isPermaLink="false">http://blog.codefront.net/2007/10/10/new-on-edge-rails-json-serialization-of-activerecord-objects-reaches-maturity/#comment-649611</guid>
		<description>[...] Note: There&#8217;s  some great JSON support since Rails 2 has come around. For more info on this see here. [...]</description>
		<content:encoded><![CDATA[<p>[...] Note: There&#8217;s  some great JSON support since Rails 2 has come around. For more info on this see here. [...]</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Brian</title>
		<link>http://blog.codefront.net/2007/10/10/new-on-edge-rails-json-serialization-of-activerecord-objects-reaches-maturity/comment-page-1/#comment-533547</link>
		<dc:creator>Brian</dc:creator>
		<pubDate>Tue, 18 Mar 2008 12:08:47 +0000</pubDate>
		<guid isPermaLink="false">http://blog.codefront.net/2007/10/10/new-on-edge-rails-json-serialization-of-activerecord-objects-reaches-maturity/#comment-533547</guid>
		<description>Is is possible to cross-domain post JSON?  Do you have an examples?</description>
		<content:encoded><![CDATA[<p>Is is possible to cross-domain post JSON?  Do you have an examples?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Chu Yeow</title>
		<link>http://blog.codefront.net/2007/10/10/new-on-edge-rails-json-serialization-of-activerecord-objects-reaches-maturity/comment-page-1/#comment-460052</link>
		<dc:creator>Chu Yeow</dc:creator>
		<pubDate>Tue, 22 Jan 2008 15:42:28 +0000</pubDate>
		<guid isPermaLink="false">http://blog.codefront.net/2007/10/10/new-on-edge-rails-json-serialization-of-activerecord-objects-reaches-maturity/#comment-460052</guid>
		<description>Yup finally did: http://dev.rubyonrails.org/ticket/10895</description>
		<content:encoded><![CDATA[<p>Yup finally did: <a href="http://dev.rubyonrails.org/ticket/10895" rel="nofollow">http://dev.rubyonrails.org/ticket/10895</a></p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Alex Egg</title>
		<link>http://blog.codefront.net/2007/10/10/new-on-edge-rails-json-serialization-of-activerecord-objects-reaches-maturity/comment-page-1/#comment-453588</link>
		<dc:creator>Alex Egg</dc:creator>
		<pubDate>Sat, 19 Jan 2008 08:50:35 +0000</pubDate>
		<guid isPermaLink="false">http://blog.codefront.net/2007/10/10/new-on-edge-rails-json-serialization-of-activerecord-objects-reaches-maturity/#comment-453588</guid>
		<description>Did you get a chance to update the tests for the issue I was describing?

http://groups.google.com/group/rubyonrails-talk/browse_thread/thread/37c42ddec5d45b2</description>
		<content:encoded><![CDATA[<p>Did you get a chance to update the tests for the issue I was describing?</p>
<p><a href="http://groups.google.com/group/rubyonrails-talk/browse_thread/thread/37c42ddec5d45b2" rel="nofollow">http://groups.google.com/group/rubyonrails-talk/browse_thread/thread/37c42ddec5d45b2</a></p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Gregory</title>
		<link>http://blog.codefront.net/2007/10/10/new-on-edge-rails-json-serialization-of-activerecord-objects-reaches-maturity/comment-page-1/#comment-423044</link>
		<dc:creator>Gregory</dc:creator>
		<pubDate>Fri, 04 Jan 2008 22:53:28 +0000</pubDate>
		<guid isPermaLink="false">http://blog.codefront.net/2007/10/10/new-on-edge-rails-json-serialization-of-activerecord-objects-reaches-maturity/#comment-423044</guid>
		<description>Hmmm... I am working with Rails 2.0.2, and the JSON support still seems to be a little rough around the edges. Check this out:

&gt;&gt;  ActiveSupport::JSON.decode(ActiveSupport::JSON.encode(&quot;&quot;))
=&gt; &quot;\\u003C\\u003E&quot;

Not idempotent. Oh my!

// Gregory</description>
		<content:encoded><![CDATA[<p>Hmmm&#8230; I am working with Rails 2.0.2, and the JSON support still seems to be a little rough around the edges. Check this out:</p>
<p>&gt;&gt;  ActiveSupport::JSON.decode(ActiveSupport::JSON.encode(&#8220;&#8221;))<br />
=&gt; &#8220;\\u003C\\u003E&#8221;</p>
<p>Not idempotent. Oh my!</p>
<p>// Gregory</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Chu Yeow</title>
		<link>http://blog.codefront.net/2007/10/10/new-on-edge-rails-json-serialization-of-activerecord-objects-reaches-maturity/comment-page-1/#comment-389565</link>
		<dc:creator>Chu Yeow</dc:creator>
		<pubDate>Wed, 12 Dec 2007 05:38:30 +0000</pubDate>
		<guid isPermaLink="false">http://blog.codefront.net/2007/10/10/new-on-edge-rails-json-serialization-of-activerecord-objects-reaches-maturity/#comment-389565</guid>
		<description>My bad it should be:

&lt;pre&gt;&lt;code class=&quot;ruby&quot;&gt;@sub_category.to_json(
  :include =&gt; [
    :category,
    :subscriptions =&gt; {
      :include =&gt; :subscriber
    }
  ]
)&lt;/code&gt;&lt;/pre&gt;

More examples at http://api.rubyonrails.org/classes/ActiveRecord/Serialization.html#M001111

Good point though, I didn&#039;t write a test for this and it is rather tricky syntax.</description>
		<content:encoded><![CDATA[<p>My bad it should be:</p>
<pre><code class="ruby">@sub_category.to_json(
  :include => [
    :category,
    :subscriptions => {
      :include => :subscriber
    }
  ]
)</code></pre>
<p>More examples at <a href="http://api.rubyonrails.org/classes/ActiveRecord/Serialization.html#M001111" rel="nofollow">http://api.rubyonrails.org/classes/ActiveRecord/Serialization.html#M001111</a></p>
<p>Good point though, I didn&#8217;t write a test for this and it is rather tricky syntax.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Chu Yeow</title>
		<link>http://blog.codefront.net/2007/10/10/new-on-edge-rails-json-serialization-of-activerecord-objects-reaches-maturity/comment-page-1/#comment-389551</link>
		<dc:creator>Chu Yeow</dc:creator>
		<pubDate>Wed, 12 Dec 2007 05:22:13 +0000</pubDate>
		<guid isPermaLink="false">http://blog.codefront.net/2007/10/10/new-on-edge-rails-json-serialization-of-activerecord-objects-reaches-maturity/#comment-389551</guid>
		<description>Ah, I believe the syntax you are looking for is this:

&lt;pre&gt;&lt;code class=&quot;ruby&quot;&gt;@sub_category.to_json(:include =&gt; [
  :category,
  :subscriptions =&gt; {
    :include =&gt; :subscriber
  }
])&lt;/code&gt;&lt;/pre&gt;</description>
		<content:encoded><![CDATA[<p>Ah, I believe the syntax you are looking for is this:</p>
<pre><code class="ruby">@sub_category.to_json(:include => [
  :category,
  :subscriptions => {
    :include => :subscriber
  }
])</code></pre>
]]></content:encoded>
	</item>
	<item>
		<title>By: Alex Egg</title>
		<link>http://blog.codefront.net/2007/10/10/new-on-edge-rails-json-serialization-of-activerecord-objects-reaches-maturity/comment-page-1/#comment-389544</link>
		<dc:creator>Alex Egg</dc:creator>
		<pubDate>Wed, 12 Dec 2007 05:18:35 +0000</pubDate>
		<guid isPermaLink="false">http://blog.codefront.net/2007/10/10/new-on-edge-rails-json-serialization-of-activerecord-objects-reaches-maturity/#comment-389544</guid>
		<description>Hey,

I tried to find you on #rubyonrails to ask you this.

Shouldn&#039;t this work: 

@sub_category.to_json(:include =&gt; [:category, {:subscriptions =&gt; { :include =&gt; :subscriber }}])

This simply including 2 attributes of sub_category: category and subscriptions. And then includes the subscriber for all subscriptions.

This fails: NoMethodError - The error occurred while evaluating nil.macro):

If I remove the category so it&#039;s like this: 

@sub_category.to_json(:include =&gt; [{:subscriptions =&gt; { :include =&gt; :subscriber }}])

The serialization works like a champ. If I add category back and remove the subscribers, it works also:

@sub_category.to_json(:include =&gt; [:category, :subscriptions ])

There seems to be something wrong with the combination of an include with an an array item including a higher order association.

What do you say? Is my syntax off?</description>
		<content:encoded><![CDATA[<p>Hey,</p>
<p>I tried to find you on #rubyonrails to ask you this.</p>
<p>Shouldn&#8217;t this work: </p>
<p>@sub_category.to_json(:include =&gt; [:category, {:subscriptions =&gt; { :include =&gt; :subscriber }}])</p>
<p>This simply including 2 attributes of sub_category: category and subscriptions. And then includes the subscriber for all subscriptions.</p>
<p>This fails: NoMethodError &#8211; The error occurred while evaluating nil.macro):</p>
<p>If I remove the category so it&#8217;s like this: </p>
<p>@sub_category.to_json(:include =&gt; [{:subscriptions =&gt; { :include =&gt; :subscriber }}])</p>
<p>The serialization works like a champ. If I add category back and remove the subscribers, it works also:</p>
<p>@sub_category.to_json(:include =&gt; [:category, :subscriptions ])</p>
<p>There seems to be something wrong with the combination of an include with an an array item including a higher order association.</p>
<p>What do you say? Is my syntax off?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Sebastian Winkler</title>
		<link>http://blog.codefront.net/2007/10/10/new-on-edge-rails-json-serialization-of-activerecord-objects-reaches-maturity/comment-page-1/#comment-379248</link>
		<dc:creator>Sebastian Winkler</dc:creator>
		<pubDate>Tue, 04 Dec 2007 16:57:20 +0000</pubDate>
		<guid isPermaLink="false">http://blog.codefront.net/2007/10/10/new-on-edge-rails-json-serialization-of-activerecord-objects-reaches-maturity/#comment-379248</guid>
		<description>Are you saying that instead of ISO 8601 Rails&#039; JSON will be using  some custom home-brew date format, because it seems &quot;more unambiguous&quot; than the crazy American format?!
I am stunned!
Whose idea was that?</description>
		<content:encoded><![CDATA[<p>Are you saying that instead of ISO 8601 Rails&#8217; JSON will be using  some custom home-brew date format, because it seems &#8220;more unambiguous&#8221; than the crazy American format?!<br />
I am stunned!<br />
Whose idea was that?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: hubert</title>
		<link>http://blog.codefront.net/2007/10/10/new-on-edge-rails-json-serialization-of-activerecord-objects-reaches-maturity/comment-page-1/#comment-360033</link>
		<dc:creator>hubert</dc:creator>
		<pubDate>Wed, 21 Nov 2007 05:32:47 +0000</pubDate>
		<guid isPermaLink="false">http://blog.codefront.net/2007/10/10/new-on-edge-rails-json-serialization-of-activerecord-objects-reaches-maturity/#comment-360033</guid>
		<description>i recently updated the restaurant model in my rails app so that it now has two associations, :has_many =&gt; :hours and :has_and_belongs_to_many =&gt; :cuisines. is there a way to automate json serialization of the restaurant object using the new to_json method?

from the example given, it&#039;s clear you can do single associations and nested single associations, but can you do multiple associations as well?

thanks for any suggestions...

-hubert</description>
		<content:encoded><![CDATA[<p>i recently updated the restaurant model in my rails app so that it now has two associations, :has_many =&gt; :hours and :has_and_belongs_to_many =&gt; :cuisines. is there a way to automate json serialization of the restaurant object using the new to_json method?</p>
<p>from the example given, it&#8217;s clear you can do single associations and nested single associations, but can you do multiple associations as well?</p>
<p>thanks for any suggestions&#8230;</p>
<p>-hubert</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Riccardo Govoni</title>
		<link>http://blog.codefront.net/2007/10/10/new-on-edge-rails-json-serialization-of-activerecord-objects-reaches-maturity/comment-page-1/#comment-307306</link>
		<dc:creator>Riccardo Govoni</dc:creator>
		<pubDate>Tue, 16 Oct 2007 05:47:49 +0000</pubDate>
		<guid isPermaLink="false">http://blog.codefront.net/2007/10/10/new-on-edge-rails-json-serialization-of-activerecord-objects-reaches-maturity/#comment-307306</guid>
		<description>Ok, thanks for the heads up about Edge Rails. About the plugin, I never created one, but I will take a look at how to do it and eventually ship it as &quot;extra stuff&quot; within my project.</description>
		<content:encoded><![CDATA[<p>Ok, thanks for the heads up about Edge Rails. About the plugin, I never created one, but I will take a look at how to do it and eventually ship it as &#8220;extra stuff&#8221; within my project.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Chu Yeow</title>
		<link>http://blog.codefront.net/2007/10/10/new-on-edge-rails-json-serialization-of-activerecord-objects-reaches-maturity/comment-page-1/#comment-307212</link>
		<dc:creator>Chu Yeow</dc:creator>
		<pubDate>Tue, 16 Oct 2007 02:00:05 +0000</pubDate>
		<guid isPermaLink="false">http://blog.codefront.net/2007/10/10/new-on-edge-rails-json-serialization-of-activerecord-objects-reaches-maturity/#comment-307212</guid>
		<description>Edge Rails allows you to do ActiveRecord::Base#from_json as well :).

But, very nice stuff you&#039;ve got there, ever thought about rolling it into a plugin for Rails 1.x?</description>
		<content:encoded><![CDATA[<p>Edge Rails allows you to do ActiveRecord::Base#from_json as well :).</p>
<p>But, very nice stuff you&#8217;ve got there, ever thought about rolling it into a plugin for Rails 1.x?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Riccardo Govoni</title>
		<link>http://blog.codefront.net/2007/10/10/new-on-edge-rails-json-serialization-of-activerecord-objects-reaches-maturity/comment-page-1/#comment-307144</link>
		<dc:creator>Riccardo Govoni</dc:creator>
		<pubDate>Mon, 15 Oct 2007 23:26:37 +0000</pubDate>
		<guid isPermaLink="false">http://blog.codefront.net/2007/10/10/new-on-edge-rails-json-serialization-of-activerecord-objects-reaches-maturity/#comment-307144</guid>
		<description>Hi, I have recently worked with some code which needed ActiveRecord to JSON conversion and viceversa. At the end, I produced my &lt;b&gt;very rough&lt;/b&gt; solution, which you can find at &lt;a href=&quot;http://battlehorse.homelinux.net/w/blog:activerecord_to_json_and_viceversa&quot; rel=&quot;nofollow&quot;&gt;this page&lt;/a&gt; . 

The nice thing is that I am able to convert to_json but also from_json, recovering or creating the activerecord counterpart as needed.
 
I am too newbie on rails to understand if it can be of any use for anyone, but I accept every kind of comment !</description>
		<content:encoded><![CDATA[<p>Hi, I have recently worked with some code which needed ActiveRecord to JSON conversion and viceversa. At the end, I produced my <b>very rough</b> solution, which you can find at <a href="http://battlehorse.homelinux.net/w/blog:activerecord_to_json_and_viceversa" rel="nofollow">this page</a> . </p>
<p>The nice thing is that I am able to convert to_json but also from_json, recovering or creating the activerecord counterpart as needed.</p>
<p>I am too newbie on rails to understand if it can be of any use for anyone, but I accept every kind of comment !</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Better JSON output from Rails with the Jsonifier plugin - redemption in a blog</title>
		<link>http://blog.codefront.net/2007/10/10/new-on-edge-rails-json-serialization-of-activerecord-objects-reaches-maturity/comment-page-1/#comment-306918</link>
		<dc:creator>Better JSON output from Rails with the Jsonifier plugin - redemption in a blog</dc:creator>
		<pubDate>Mon, 15 Oct 2007 14:58:42 +0000</pubDate>
		<guid isPermaLink="false">http://blog.codefront.net/2007/10/10/new-on-edge-rails-json-serialization-of-activerecord-objects-reaches-maturity/#comment-306918</guid>
		<description>[...] Edge Rails now does whatever Jsonifier does (and more). Check out my blog post on JSON serialization maturity in edge Rails. This means that this plugin is almost obsolete if you are using edge Rails and don&#8217;t require [...]</description>
		<content:encoded><![CDATA[<p>[...] Edge Rails now does whatever Jsonifier does (and more). Check out my blog post on JSON serialization maturity in edge Rails. This means that this plugin is almost obsolete if you are using edge Rails and don&#8217;t require [...]</p>
]]></content:encoded>
	</item>
</channel>
</rss>
