[ https://issues.apache.org/jira/browse/SOLR-6445?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14114053#comment-14114053 ]
Uwe Schindler commented on SOLR-6445: ------------------------------------- Hi, sorry I was not arguing against this change! I just wanted to mention that "JSON" has a spec. I strongly agree that "keys" should be free to use no quotes at all, because that is what you know from ECMA Script. ECMA Script also allows single quotes. If we allow that, of course single quotes must be escaped in input data. Interestingly at the same time when [~noble.paul]'s issue was opened, in my mailbox the announcement for PHP 5.6 went in. Interestingly they do the opposite: Their parser json_decode was more flexible before, now its hardened to be more strict: http://php.net/releases/5_6_0.php (I don't know how many apps will break). In any case, we may accept more relax JSON - I have no problem with that, _but when delivering JSON in the ResponseWriter we should be 100% according to spec (this includes also escaping forward slashes)._ Because the client may be a browser, and browsers only accept 100% valid JSON for security reasons if you parse with the official JSON API in newer browsers (if you use unsafe JSONP or eval() to parse, you should be killed). > Allow flexible JSON input > -------------------------- > > Key: SOLR-6445 > URL: https://issues.apache.org/jira/browse/SOLR-6445 > Project: Solr > Issue Type: Improvement > Reporter: Noble Paul > > Support single quotes and unquoted keys > {code:javascript} > //all the following must be valid and equivalent > {"id" :"mykey"} > {'id':'mykey'} > {id: "mykey"} > {code} -- This message was sent by Atlassian JIRA (v6.2#6252) --------------------------------------------------------------------- To unsubscribe, e-mail: dev-unsubscr...@lucene.apache.org For additional commands, e-mail: dev-h...@lucene.apache.org