json
json copied to clipboard
:space_before is broken
puts JSON.generate( { "test" =>1, "omg" => "wtf"}, :indent => " ", :object_nl => "\n", :space_before => " ", :space => " ")
the above line yields: { "test": 1, "omg": "wtf" }
when it is expected to yield: (the space before the : is not there)
{ "test" : 1, "omg" : "wtf" }
I noticed that none of the generate tests actually test space_before. in each test the value is "" https://github.com/flori/json/blob/e6f3fdc135f10458e090201fbb15fafbaa166a0d/tests/test_json_generate.rb
I sent a pull to solve this issue: https://github.com/flori/json/pull/225