senchalabs/connect — pull request #513 by beatgammit (2012-03-22 00:12:38+00:00)
Title: Remove JSON validity restriction

According to json.org, valid JSON can start with any of the following:

* double-quote- for strings
* left bracket- for arrays
* left brace- for objects
* true/false- for booleans
* number- for numbers
* null- for null

I ran into a problem where I was getting 400 errors when POSTing properly quoted strings, and found this to be the cause. The only reason I can think of for this restriction is speed (try/catch is expensive). If this is not an acceptable solution, I have another pull request with a regex to replace this conditional.