<?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: Cerny.js: Schema for JSON</title>
	<atom:link href="http://ajaxian.com/archives/cernyjs-schema-for-json/feed" rel="self" type="application/rss+xml" />
	<link>http://ajaxian.com/archives/cernyjs-schema-for-json</link>
	<description>Cleaning up the web with Ajax</description>
	<lastBuildDate>Thu, 09 Feb 2012 06:55:33 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.2</generator>
	<item>
		<title>By: nautilebleu</title>
		<link>http://ajaxian.com/archives/cernyjs-schema-for-json/comment-page-1#comment-259942</link>
		<dc:creator>nautilebleu</dc:creator>
		<pubDate>Thu, 13 Dec 2007 13:15:05 +0000</pubDate>
		<guid isPermaLink="false">http://ajaxian.com/?p=2714#comment-259942</guid>
		<description>I find this very useful to validate data sended by the server to a SCORM.

Thanks !</description>
		<content:encoded><![CDATA[<p>I find this very useful to validate data sended by the server to a SCORM.</p>
<p>Thanks !</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Rajnikant Parekh</title>
		<link>http://ajaxian.com/archives/cernyjs-schema-for-json/comment-page-1#comment-256877</link>
		<dc:creator>Rajnikant Parekh</dc:creator>
		<pubDate>Wed, 10 Oct 2007 18:34:12 +0000</pubDate>
		<guid isPermaLink="false">http://ajaxian.com/?p=2714#comment-256877</guid>
		<description>Wow, very nice solution. I found it to be very useful.</description>
		<content:encoded><![CDATA[<p>Wow, very nice solution. I found it to be very useful.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Jerome</title>
		<link>http://ajaxian.com/archives/cernyjs-schema-for-json/comment-page-1#comment-254715</link>
		<dc:creator>Jerome</dc:creator>
		<pubDate>Thu, 30 Aug 2007 13:11:50 +0000</pubDate>
		<guid isPermaLink="false">http://ajaxian.com/?p=2714#comment-254715</guid>
		<description>A great idea and an elegant execution from someone who obviously has a highly organised mind. Just wish I was organised enough to get around to using it... :)</description>
		<content:encoded><![CDATA[<p>A great idea and an elegant execution from someone who obviously has a highly organised mind. Just wish I was organised enough to get around to using it&#8230; :)</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Robert Cerny</title>
		<link>http://ajaxian.com/archives/cernyjs-schema-for-json/comment-page-1#comment-254705</link>
		<dc:creator>Robert Cerny</dc:creator>
		<pubDate>Thu, 30 Aug 2007 07:37:08 +0000</pubDate>
		<guid isPermaLink="false">http://ajaxian.com/?p=2714#comment-254705</guid>
		<description>@Junior: Your Person schema is actually a Cerny schema, which can be passed to the CERNY.schema.validate method. It has some drawbacks though: 1. you can pass in 2001-55-77 for a birth date, but that is certainly not a valid date, 2. if you want to change the meaning of non empty string (unlikely in this example), you have to edit three lines of code, where as in my solution, you have to only have to redefine the function nonEmptyString, 3. middleName is not optional in your case, it must be present.
@Andras: I agree with Kris. Validation during development time *is* useful and helps to detect errors early. During development the document types that are sent back from the server will change because it is a work in progress. If the document type is described in whichever formal way, it helps communication between developers. This might not be helpful for a team that fits in one room, but in larger teams communication is more difficult, and thus it needs support from all ends.
@Adam: Thanks!</description>
		<content:encoded><![CDATA[<p>@Junior: Your Person schema is actually a Cerny schema, which can be passed to the CERNY.schema.validate method. It has some drawbacks though: 1. you can pass in 2001-55-77 for a birth date, but that is certainly not a valid date, 2. if you want to change the meaning of non empty string (unlikely in this example), you have to edit three lines of code, where as in my solution, you have to only have to redefine the function nonEmptyString, 3. middleName is not optional in your case, it must be present.<br />
@Andras: I agree with Kris. Validation during development time *is* useful and helps to detect errors early. During development the document types that are sent back from the server will change because it is a work in progress. If the document type is described in whichever formal way, it helps communication between developers. This might not be helpful for a team that fits in one room, but in larger teams communication is more difficult, and thus it needs support from all ends.<br />
@Adam: Thanks!</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Adam Sanderson</title>
		<link>http://ajaxian.com/archives/cernyjs-schema-for-json/comment-page-1#comment-254669</link>
		<dc:creator>Adam Sanderson</dc:creator>
		<pubDate>Wed, 29 Aug 2007 16:13:56 +0000</pubDate>
		<guid isPermaLink="false">http://ajaxian.com/?p=2714#comment-254669</guid>
		<description>Cerny has been around for a while, it has some pretty cool features beyond those in the code snippet above.  Certainly worth looking at if you expect a client to be sending back JSON objects, or just to do complex form validation, etc.</description>
		<content:encoded><![CDATA[<p>Cerny has been around for a while, it has some pretty cool features beyond those in the code snippet above.  Certainly worth looking at if you expect a client to be sending back JSON objects, or just to do complex form validation, etc.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Kris Zyp</title>
		<link>http://ajaxian.com/archives/cernyjs-schema-for-json/comment-page-1#comment-254666</link>
		<dc:creator>Kris Zyp</dc:creator>
		<pubDate>Wed, 29 Aug 2007 15:51:27 +0000</pubDate>
		<guid isPermaLink="false">http://ajaxian.com/?p=2714#comment-254666</guid>
		<description>Structural definition for validation is included in the &lt;a href=&quot;http://www.jspon.org&quot; rel=&quot;nofollow&quot;&gt;JSPON specification&lt;/a&gt; for JSON. Have you considered using this standard to ingest structural definitions for your validation? This allows JSON objects to include their own structure/validation information.
@Andras: This is useful when the JSON data is going to be modified. By including validation information with the objects, invalid data can be detected by the client before sending it to the server.</description>
		<content:encoded><![CDATA[<p>Structural definition for validation is included in the <a href="http://www.jspon.org" rel="nofollow">JSPON specification</a> for JSON. Have you considered using this standard to ingest structural definitions for your validation? This allows JSON objects to include their own structure/validation information.<br />
@Andras: This is useful when the JSON data is going to be modified. By including validation information with the objects, invalid data can be detected by the client before sending it to the server.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Tim</title>
		<link>http://ajaxian.com/archives/cernyjs-schema-for-json/comment-page-1#comment-254660</link>
		<dc:creator>Tim</dc:creator>
		<pubDate>Wed, 29 Aug 2007 13:47:50 +0000</pubDate>
		<guid isPermaLink="false">http://ajaxian.com/?p=2714#comment-254660</guid>
		<description>Those who do not learn from XML are doomed to repeat it :)
I guess the next logical step are namespaces, because once you have schemas and want to re-use them, you need a clean way to combine them.</description>
		<content:encoded><![CDATA[<p>Those who do not learn from XML are doomed to repeat it :)<br />
I guess the next logical step are namespaces, because once you have schemas and want to re-use them, you need a clean way to combine them.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Junior DeSuza</title>
		<link>http://ajaxian.com/archives/cernyjs-schema-for-json/comment-page-1#comment-254659</link>
		<dc:creator>Junior DeSuza</dc:creator>
		<pubDate>Wed, 29 Aug 2007 13:47:01 +0000</pubDate>
		<guid isPermaLink="false">http://ajaxian.com/?p=2714#comment-254659</guid>
		<description>It would be a better syntax with regexes:

Person = {
  firstName: /^.+$/,
  middleName: /^.*/,
  lastName: /^.+$/,
  dateOfBirth: /^\d\d\d\d-\d\d-\d\d$/
};

But you don&#039;t need JSON schema for this - you just code it.</description>
		<content:encoded><![CDATA[<p>It would be a better syntax with regexes:</p>
<p>Person = {<br />
  firstName: /^.+$/,<br />
  middleName: /^.*/,<br />
  lastName: /^.+$/,<br />
  dateOfBirth: /^\d\d\d\d-\d\d-\d\d$/<br />
};</p>
<p>But you don&#8217;t need JSON schema for this &#8211; you just code it.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: jr</title>
		<link>http://ajaxian.com/archives/cernyjs-schema-for-json/comment-page-1#comment-254655</link>
		<dc:creator>jr</dc:creator>
		<pubDate>Wed, 29 Aug 2007 13:24:57 +0000</pubDate>
		<guid isPermaLink="false">http://ajaxian.com/?p=2714#comment-254655</guid>
		<description>What about XML Schema validation ? I&#039;m not interested in json.</description>
		<content:encoded><![CDATA[<p>What about XML Schema validation ? I&#8217;m not interested in json.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: AndrÃ¡s BÃ¡rthÃ¡zi</title>
		<link>http://ajaxian.com/archives/cernyjs-schema-for-json/comment-page-1#comment-254654</link>
		<dc:creator>AndrÃ¡s BÃ¡rthÃ¡zi</dc:creator>
		<pubDate>Wed, 29 Aug 2007 13:11:14 +0000</pubDate>
		<guid isPermaLink="false">http://ajaxian.com/?p=2714#comment-254654</guid>
		<description>While I like the idea, what is it actually good for in practice? JSON usually coming from the server, and typically has no errors.</description>
		<content:encoded><![CDATA[<p>While I like the idea, what is it actually good for in practice? JSON usually coming from the server, and typically has no errors.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Rob</title>
		<link>http://ajaxian.com/archives/cernyjs-schema-for-json/comment-page-1#comment-254652</link>
		<dc:creator>Rob</dc:creator>
		<pubDate>Wed, 29 Aug 2007 12:51:42 +0000</pubDate>
		<guid isPermaLink="false">http://ajaxian.com/?p=2714#comment-254652</guid>
		<description>I have also build something like this. 
&lt;code&gt;
{	&quot;object&quot;:{		&quot;properties&quot;:[			{				&quot;name&quot;:&quot;prop1&quot;,				&quot;type&quot;:{					&quot;array&quot;:{						&quot;minLength&quot;:0,						&quot;maxLength&quot;:5,						&quot;type&quot;:{							&quot;string&quot;:{								&quot;minLength&quot;:0,								&quot;maxLength&quot;:5,								&quot;default&quot;:&quot;test&quot;							}						}					}				}			}		]	}}
&lt;/code&gt;
http://r.versluis.millipede.nl/</description>
		<content:encoded><![CDATA[<p>I have also build something like this.<br />
<code><br />
{	"object":{		"properties":[			{				"name":"prop1",				"type":{					"array":{						"minLength":0,						"maxLength":5,						"type":{							"string":{								"minLength":0,								"maxLength":5,								"default":"test"							}						}					}				}			}		]	}}<br />
</code><br />
<a href="http://r.versluis.millipede.nl/" rel="nofollow">http://r.versluis.millipede.nl/</a></p>
]]></content:encoded>
	</item>
</channel>
</rss>

