Syck parse error for JSON

YAML emits a parse error for

require ‘yaml’
p YAML::load(’{“test”:1}’)

because there isn’t a space after the colon.

Is there an option YAML provides that lets me load any JSON? Do I need
to download and use a JSON parser?

This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.

| Privacy Policy | Terms of Service | Remote Ruby Jobs