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';
} else if (type == 'object') {
ret = ['{', '}'].join(
value.map(function(v, k) {
return quote(k) + ': ' + stringify(v);
Object.keys(value).map(function(k) {
return quote(k) + ': ' + stringify(value[k]);
}).join(',')
);
} else if (type == 'string') {