fix object stringify

This commit is contained in:
j 2012-05-26 15:47:41 +00:00
parent 0fc0e671e1
commit 61e05f4f86

View file

@ -185,8 +185,8 @@ Ox.fallback.JSON = (function() {
ret = isFinite(value) ? String(value) : 'null'; ret = isFinite(value) ? String(value) : 'null';
} else if (type == 'object') { } else if (type == 'object') {
ret = ['{', '}'].join( ret = ['{', '}'].join(
value.map(function(v, k) { Object.keys(value).map(function(k) {
return quote(k) + ': ' + stringify(v); return quote(k) + ': ' + stringify(value[k]);
}).join(',') }).join(',')
); );
} else if (type == 'string') { } else if (type == 'string') {