| @@ 780-784 (lines=5) @@ | ||
| 777 | // "name":value pair |
|
| 778 | $key = $this->decode($parts[1]); |
|
| 779 | $val = $this->decode(trim(substr($slice, strlen($parts[0])), ", \t\n\r\0\x0B")); |
|
| 780 | if ($this->use & SERVICES_JSON_LOOSE_TYPE) { |
|
| 781 | $obj[$key] = $val; |
|
| 782 | } else { |
|
| 783 | $obj->$key = $val; |
|
| 784 | } |
|
| 785 | } elseif (preg_match('/^\s*(\w+)\s*:/Uis', $slice, $parts)) { |
|
| 786 | // name:value pair, where name is unquoted |
|
| 787 | $key = $parts[1]; |
|
| @@ 790-794 (lines=5) @@ | ||
| 787 | $key = $parts[1]; |
|
| 788 | $val = $this->decode(trim(substr($slice, strlen($parts[0])), ", \t\n\r\0\x0B")); |
|
| 789 | ||
| 790 | if ($this->use & SERVICES_JSON_LOOSE_TYPE) { |
|
| 791 | $obj[$key] = $val; |
|
| 792 | } else { |
|
| 793 | $obj->$key = $val; |
|
| 794 | } |
|
| 795 | } |
|
| 796 | ||
| 797 | } |
|