From: Aaron D. Gifford on
On Mon, Mar 8, 2010 at 12:19 PM, Brian Candler <b.candler(a)pobox.com> 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.