From e4e30bd0187c875e9778e7c4ac9eb3c48753c97a Mon Sep 17 00:00:00 2001 From: David Grudl Date: Thu, 19 Dec 2019 19:57:19 +0100 Subject: [PATCH] Literal cannot begin with a character ':' when it follows after '" to improve JSON compatibility (syntax BC break) --- src/Neon/Decoder.php | 2 +- tests/Neon/Decoder.inline.array.phpt | 3 +++ 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/src/Neon/Decoder.php b/src/Neon/Decoder.php index d1379dc2..f8411f93 100644 --- a/src/Neon/Decoder.php +++ b/src/Neon/Decoder.php @@ -27,7 +27,7 @@ final class Decoder // literal / boolean / integer / float ' - (?: [^#"\',:=[\]{}()\x00-\x20`-] | [:-] [^"\',=[\]{}()\s] ) + (?: [^#"\',:=[\]{}()\x00-\x20`-] | (? true], Neon::decode('{"a":true}'));