# File src/ruby_supportlib/phusion_passenger/vendor/union_station_hooks_core/lib/union_station_hooks_core/simple_json.rb, line 250 def test_single_line_comments source = %Q{ // comment before document { // comment "foo": "1", "bar": "2", // another comment "baz": "3", "array": [ // comment inside array 1, 2, 3 // comment at end of array ] // comment at end of hash } // comment after document } doc = { "foo" => "1", "bar" => "2", "baz" => "3", "array" => [1, 2, 3] } assert_equal(doc, JSON.parse(source)) end