Not too good in ruby - but all the work here is done in the regular expression no? Then use the same cheat to string a couple of rev lines together?

On 6 Jan 2006, at 20:37, Mark Wieder wrote:

<g> It'll be hard to beat the one-line Ruby parser:

<code type="ruby">
null=nil; jsonobj = eval(json.gsub(/(["'])\s*:\s*(['"0-9tfn\[{])/) {"#{$1}=>#{$2}"})
</code>

_______________________________________________
use-revolution mailing list
use-revolution@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-revolution

Reply via email to