From: "Aaron D. Gifford" Date: 2010-03-09T09:40:38+09:00 Subject: Re: Ruby 1.9.1 built-in JSON troubles On Mon, Mar 8, 2010 at 12:19 PM, Brian Candler wrote: >... If you are afraid of building an extra string, then how > about: > > def jparse(str) >  return JSON.parse(str) if str =~ /\A\s*[{\[]/ >  JSON.parse("[#{str}]")[0] > end Definitely more robust, since that will handle numbers too. Thanks Aaron out.