Ruby json

From wikinotes
require 'json'

{"a" => "b"}.to_json
#> '{"a": "b"}'

JSON.parse('{"a": 1}')
#> { "a" => 1 }