<rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/">
    <channel>
        <title>json - Mark Rogers</title>
        <description>This is the Oxite Sample description</description>
        <link>http://www.markdavidrogers.com/oxitesample/Tags/json</link>
        <language>en</language>
        <image>
            <url>http://www.markdavidrogers.com/oxitesample/Content/icons/flame.png</url>
            <title>Mark Rogers</title>
            <link>http://www.markdavidrogers.com/oxitesample/Tags/json</link>
            <width>64</width>
            <height>64</height>
        </image>
        <item>
            <dc:creator>Admin</dc:creator>
            <title>Json Pretty Printer/Beautifier Library For .Net</title>
            <description>&lt;p&gt;In the current project I'm working on, I need to create a lot of configuration/data files for when the application builds the database (Fluent-Nhibernate).  This appears necessary because the application must populate the database with some default mostly static domain objects that are required for the application to begin working normally.&lt;/p&gt;
&lt;p&gt;  The two main .net json Beautifiers were &lt;a href=&quot;http://jayrock.berlios.de/&quot;&gt;Jayrock&lt;/a&gt;, and the C# source code of a &quot;quick and dirty&quot; json pretty printer &lt;a href=&quot;http://weblog.cynosura.eu/post/2010/03/06/Json-Pretty-Printer.aspx&quot;&gt; by Raymond Glover &lt;/a&gt;.  I actually like Raymond's a little better, because Jayrock is more of a general purpose Json library rather than being focused on pretty printing. &lt;/p&gt;
&lt;p&gt; Raymond's was cool, but I wanted one that would conform exactly to a specific json beautifier &lt;a href=&quot;http://www.jsonlint.com/&quot;&gt; JsonLint &lt;/a&gt;.   Seeing how short and easy it was for Raymond, I decide to write my own json beautifier/pretty printer and wire it up to my blog.  I think I mostly wanted an excuse to use the strategy pattern in a situation where it appeared to be needed.
&lt;/p&gt;
&lt;p&gt;&lt;textarea id=&quot;json-text&quot; cols=&quot;80&quot; rows=&quot;10&quot; wrap=&quot;off&quot;&gt;&lt;/textarea&gt;&lt;/p&gt;
&lt;p&gt;&lt;button id=&quot;beautify-json-button&quot;&gt;Beautify Json&lt;/button&gt; &lt;/p&gt;

&lt;script type=&quot;text/javascript&quot;&gt;
      $(document).ready(function() {
          $(&quot;#beautify-json-button&quot;).click( function () {
	 	 var inputJson = $('#json-text').val();	 
	      		$.post(&quot;/oxitesample/JsonPrettyPrinter/BeautifyJson&quot;,
	 	 	     { &quot;unprettyJson&quot; : inputJson },
			     function(data){
						$('#json-text').val(data);
        	 	 }, &quot;json&quot;);
	 });
      });
 &lt;/script&gt;
&lt;p&gt;&lt;a href=&quot;http://www.markdavidrogers.com/files/JsonPrettyPrinterPlus.dll&quot;&gt;You can download the DLL here (using .net framework 3.5). [10k]&lt;/a&gt; or the &lt;a href=&quot;http://www.markdavidrogers.com/files/JsonPrettyPrinterPlus.zip&quot;&gt;source code here. [223k, zip]&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;
You can use the pretty printer object or just the extension methods I've provided.  I've included json and/or beautifing extension methods, for ease of use.&lt;/p&gt;</description>
            <link>http://www.markdavidrogers.com/oxitesample/Blog/json-pretty-printerbeautifier-library-for-net</link>
            <guid isPermaLink="true">http://www.markdavidrogers.com/oxitesample/Blog/json-pretty-printerbeautifier-library-for-net</guid>
            <pubDate>Fri, 16 Apr 2010 18:47:00 GMT</pubDate>
            <category>.net</category>
            <category>beautify</category>
            <category>json</category>
        </item>
    </channel>
</rss>

