Repository navigation
What's Changed
- The
script_safe: trueoption ofJSON.generateno longer escapes forward slashes/, and instead escapes script tag
openings (<script), script tag closing (</script) and HTML comments (<!--) as recommended by the HTML spec. - The
script_safe: trueoption ofJSON.generateno longer escapesU+2028andU+2029given that Javascript is
now a proper subset of JSON since many years (see: https://github.com/tc39/proposal-json-superset). - Fix
JSON::ParserError#json_pathraisingNoMethodErrorwhen the document was parsed withsymbolize_names: true. - Fix
JSON.generatenot detecting duplicate keys such as{ "1" => 1, 1 => 2 }. - JRuby: raise
TypeErrorwhen a String subclass used as a Hash key has ato_sthat doesn't return a String, like the C extension. - JRuby and TruffleRuby: fix a stack overflow in
JSON::Coderwhenas_jsonreturns a Symbol for a string with invalid encoding. - JRuby: fix
JSON::Coder(and any frozenJSON::State) not being thread-safe. Each#dumpcall now uses its own nesting depth instead of mutating the shared state, which under concurrent use could make every later call raiseJSON::NestingError.
Full Changelog: v3.1.0...v3.2.0