diff options
| author | Misko Hevery | 2010-01-09 15:02:43 -0800 |
|---|---|---|
| committer | Misko Hevery | 2010-01-09 15:02:43 -0800 |
| commit | 9b9a0dadcce82ae42ac09ad396d647739af20a06 (patch) | |
| tree | 854d162ac442509d12b17d7ed5123d7d43850f1e /src/JSON.js | |
| parent | 88eca572fdc7f68a7f384b612052c49de00df433 (diff) | |
| download | angular.js-9b9a0dadcce82ae42ac09ad396d647739af20a06.tar.bz2 | |
removed nglr namespace
Diffstat (limited to 'src/JSON.js')
| -rw-r--r-- | src/JSON.js | 20 |
1 files changed, 10 insertions, 10 deletions
diff --git a/src/JSON.js b/src/JSON.js index 2b6393bf..84c9a857 100644 --- a/src/JSON.js +++ b/src/JSON.js @@ -1,18 +1,18 @@ -nglr.array = [].constructor; +array = [].constructor; -nglr.toJson = function(obj, pretty){ +toJson = function(obj, pretty){ var buf = []; - nglr.toJsonArray(buf, obj, pretty ? "\n " : null); + toJsonArray(buf, obj, pretty ? "\n " : null); return buf.join(''); }; -nglr.toPrettyJson = function(obj) { - return nglr.toJson(obj, true); +toPrettyJson = function(obj) { + return toJson(obj, true); }; -nglr.fromJson = function(json) { +fromJson = function(json) { try { - var parser = new nglr.Parser(json, true); + var parser = new Parser(json, true); var expression = parser.primary(); parser.assertAllConsumed(); return expression(); @@ -23,7 +23,7 @@ nglr.fromJson = function(json) { }; -nglr.toJsonArray = function(buf, obj, pretty){ +toJsonArray = function(buf, obj, pretty){ var type = typeof obj; if (obj === null) { buf.push("null"); @@ -50,7 +50,7 @@ nglr.toJsonArray = function(buf, obj, pretty){ if (typeof item == 'function' || typeof item == 'undefined') { buf.push("null"); } else { - nglr.toJsonArray(buf, item, pretty); + toJsonArray(buf, item, pretty); } sep = true; } @@ -80,7 +80,7 @@ nglr.toJsonArray = function(buf, obj, pretty){ } buf.push(angular.String.quote(key)); buf.push(":"); - nglr.toJsonArray(buf, value, childPretty); + toJsonArray(buf, value, childPretty); comma = true; } } catch (e) { |
