mirror of
https://github.com/Hopiu/angular.js.git
synced 2026-05-28 07:23:59 +00:00
refactor(json): use angularString instead of angular.String
This commit is contained in:
parent
9d808239b3
commit
035ad72726
1 changed files with 4 additions and 4 deletions
|
|
@ -87,7 +87,7 @@ function toJsonArray(buf, obj, pretty, stack) {
|
||||||
if (obj === null) {
|
if (obj === null) {
|
||||||
buf.push($null);
|
buf.push($null);
|
||||||
} else if (obj instanceof RegExp) {
|
} else if (obj instanceof RegExp) {
|
||||||
buf.push(angular.String.quoteUnicode(obj.toString()));
|
buf.push(angularString.quoteUnicode(obj.toString()));
|
||||||
} else if (isFunction(obj)) {
|
} else if (isFunction(obj)) {
|
||||||
return;
|
return;
|
||||||
} else if (isBoolean(obj)) {
|
} else if (isBoolean(obj)) {
|
||||||
|
|
@ -99,7 +99,7 @@ function toJsonArray(buf, obj, pretty, stack) {
|
||||||
buf.push('' + obj);
|
buf.push('' + obj);
|
||||||
}
|
}
|
||||||
} else if (isString(obj)) {
|
} else if (isString(obj)) {
|
||||||
return buf.push(angular.String.quoteUnicode(obj));
|
return buf.push(angularString.quoteUnicode(obj));
|
||||||
} else if (isObject(obj)) {
|
} else if (isObject(obj)) {
|
||||||
if (isArray(obj)) {
|
if (isArray(obj)) {
|
||||||
buf.push("[");
|
buf.push("[");
|
||||||
|
|
@ -120,7 +120,7 @@ function toJsonArray(buf, obj, pretty, stack) {
|
||||||
// TODO(misko): maybe in dev mode have a better error reporting?
|
// TODO(misko): maybe in dev mode have a better error reporting?
|
||||||
buf.push('DOM_ELEMENT');
|
buf.push('DOM_ELEMENT');
|
||||||
} else if (isDate(obj)) {
|
} else if (isDate(obj)) {
|
||||||
buf.push(angular.String.quoteUnicode(angular.Date.toString(obj)));
|
buf.push(angularString.quoteUnicode(angular.Date.toString(obj)));
|
||||||
} else {
|
} else {
|
||||||
buf.push("{");
|
buf.push("{");
|
||||||
if (pretty) buf.push(pretty);
|
if (pretty) buf.push(pretty);
|
||||||
|
|
@ -141,7 +141,7 @@ function toJsonArray(buf, obj, pretty, stack) {
|
||||||
buf.push(",");
|
buf.push(",");
|
||||||
if (pretty) buf.push(pretty);
|
if (pretty) buf.push(pretty);
|
||||||
}
|
}
|
||||||
buf.push(angular.String.quote(key));
|
buf.push(angularString.quote(key));
|
||||||
buf.push(":");
|
buf.push(":");
|
||||||
toJsonArray(buf, value, childPretty, stack);
|
toJsonArray(buf, value, childPretty, stack);
|
||||||
comma = true;
|
comma = true;
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue