From 77659a8b193d49d6353e508a647df20cdfd0a7e4 Mon Sep 17 00:00:00 2001 From: Dennis Schafroth Date: Fri, 25 Jun 2010 10:24:22 +0200 Subject: [PATCH] Remove simulation of JSON --- www/iphone/iphone.js | 24 ------------------------ 1 file changed, 24 deletions(-) diff --git a/www/iphone/iphone.js b/www/iphone/iphone.js index 65c7d1e..9c9fbe0 100644 --- a/www/iphone/iphone.js +++ b/www/iphone/iphone.js @@ -1,6 +1,5 @@ var count = 0; var termlist = {}; -var JSON = JSON || {}; var inApp = false; var callback = {}; @@ -39,29 +38,6 @@ callback.send = function() document.getElementById("log").innerHTML = message; } -// implement JSON.stringify serialization -JSON.stringify = JSON.stringify || function(obj) { - var t = typeof (obj); - if (t != "object" || obj === null) { - // simple data type - if (t == "string") - obj = '"' + obj + '"'; - return String(obj); - } else { - // recurse array or object - var n, v, json = [], arr = (obj && obj.constructor == Array); - for (n in obj) { - v = obj[n]; - t = typeof (v); - if (t == "string") - v = '"' + v + '"'; - else if (t == "object" && v !== null) - v = JSON.stringify(v); - json.push((arr ? "" : '"' + n + '":') + String(v)); - } - return (arr ? "[" : "{") + String(json) + (arr ? "]" : "}"); - } -}; function search(message) { document.search.query.value = message; -- 1.7.10.4