note 76581 deleted from function.json-decode by danbrown

From: Date: Sat, 02 May 2009 14:55:52 +0000
Subject: note 76581 deleted from function.json-decode by danbrown
References: 1  Groups: php.notes 
Request: Send a blank email to php-notes+get-154142@lists.php.net to get a copy of this message
Note Submitter: AMA3 ---- phpben at hood dot id dot au wrote: > AFAICT. The JSON docs seem to say that '"','/' and '\' must > be quoted with a '\' At first glance, it seems that way, but if you read the RFC (4627) carefully, forward-slash (/) *may* be escaped but need not be. Specifically, Section 2.5 defines the following: string = quotation-mark *char quotation-mark char = unescaped / ... unescaped = %x20-21 / %x23-5B / %x5D-10FFFF Forward slash falls in the second range of unescaped characters, at %x2F. It's strange that forward-slash is permitted to be escaped but not required to be, and that it has the same meaning either way, but that's how it's written, and so shall it be. FMI: http://www.ietf.org/rfc/rfc4627.txt

« previous php.notes (#154142) next »