- From: Thomas Steiner <tomac@google.com>
- Date: Mon, 29 Aug 2011 14:03:51 +0200
- To: Linked JSON <public-linked-json@w3.org>
Hi all, It has become a sometimes observable practice among JSON providers who deliver JSON over the Web in a way that it might end up in a <script> tag to escape forward slashes (aka. solidus) with a backward slash like so: "\/". This is due to the fact that within a <script> tag the string "</" may not occur. Given the ubiquity of IRIs (typically in the form of "http://") in JSON-LD (well, RDF in general), I was wondering whether we should make a statement with regards to forward slash escaping in the JSON-LD spec (i.e., "http:\/\/"). Note: escaping forward slashes is not required [1], however, e.g., PHP's json_encode() function by default adds slashes, whereas JavaScript's JSON.stringify() function does not. Opinions? Thanks, Tom [1] http://json.org/string.gif -- Thomas Steiner, Research Scientist, Google Inc. http://blog.tomayac.com, http://twitter.com/tomayac
Received on Monday, 29 August 2011 12:05:26 UTC