26 $assoc = array_diff_key($data,array_keys(array_keys($data)));
28 $str .= $assoc ?
'{' :
'[';
31 foreach($data as $key => $value)
33 $str .= $first ?
'' :
',';
34 $str .= $assoc ? static::_quote($key).
':' :
'';
35 $str .= static::_encode($value);
39 $str .= $assoc ?
'}' :
']';
45 elseif($data ===
null)
51 $str = static::_quote($data);