Your Universal Remote Control Center
RemoteCentral.com
Philips Pronto Professional Forum - View Post
Up level
Up level
The following page was printed from RemoteCentral.com:

Login:
Pass:
 
 

Original thread:
Post 24 made on Tuesday April 13, 2010 at 17:56
sWORDs
Long Time Member
Joined:
Posts:
November 2006
373
On April 13, 2010 at 14:49, Lyndel McGee said...
I've used eval since day #1. Eval is not the issue I was concerned with. It is the overhead of having to load a JSON library for everything. ;-)

If you have one you are considering/working with, I'd like to give it a try. You can email me @ yahoo as I can pickup attachments there.

There is no need to email it, it's just a compressed version of json2.js form json.org. (The one that's working, my own parser still is kind of a mess.)

if(!this.JSON){this.JSON={};}(
function(){function f(n){return n<10?'0'+n:n;}var cx=/[\u0000\u00ad\u0600-\u0604\u070f\u17b4\u17b5\u200c-\u200f\u2028-\u202f\u2060-\u206f\ufeff\ufff0-\uffff]/g,escapable=/[\\\"\x00-\x1f\x7f-\x9f\u00ad\u0600-\u0604\u070f\u17b4\u17b5\u200c-\u200f\u2028-\u202f\u2060-\u206f\ufeff\ufff0-\uffff]/g,gap,indent,meta={'\b':'\\b','\t':'\\t','\n':'\\n','\f':'\\f','\r':'\\r','"':'\\"','\\':'\\\\'},rep;function quote(string){escapable.lastIndex=0;return escapable.test(string)?'"'+string.replace(escapable,function(a){var c=meta[a];return typeof c==='string'?c:'\\u'+('0000'+a.charCodeAt(0).toString(16)).slice(-4);})+'"':'"'+string+'"';}function str(key,holder){var i,k,v,length,mind=gap,partial,value=holder[key];if(value&&typeof value==='object'&&typeof value.toJSON==='function'){value=value.toJSON(key);}if(typeof rep==='function'){value=rep.call(holder,key,value);}switch(typeof value){case'string':return quote(value);case'number':return isFinite(value)?String(value):'null';case'boolean':case'null':return String(value);case'object':if(!value){return'null'


Hosting Services by ipHouse