diff --git a/jzon.inc.php b/jzon.inc.php index 29efc35..081aba7 100644 --- a/jzon.inc.php +++ b/jzon.inc.php @@ -249,7 +249,9 @@ class jzonParser { $end = $this->c; ++$this->c; - return substr($this->in, $start, $end - $start); + $str = substr($this->in, $start, $end - $start); + //let's remove escape slashes before " + return str_replace('\\"', '"', $str); } $prev = $this->in[$this->c]; ++$this->c; @@ -351,6 +353,7 @@ function jzon_parse($str) else { $p = new jzonParser($str); - return $p->parse(); + $res = $p->parse(); + return $res; } }