Skip to content

Java implementation of JSON.pretty_generate generates different output to MRI for at least an empty hash #440

@chrisseaton

Description

@chrisseaton

From jruby/jruby#6338.

require 'json'
puts JSON.pretty_generate({})
% chruby 2.5.7
% ruby -v test.rb 
ruby 2.5.7p206 (2019-10-01 revision 67816) [x86_64-darwin19]
{
}
% chruby jruby 9.2.11.1
% ruby -v test.rb
jruby 9.2.11.1 (2.5.7) 2020-03-25 b1f55b1a40 OpenJDK 64-Bit Server VM 25.252-b14 on 1.8.0_252-b14 +jit [darwin-x86_64]
{

}

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions