ruby / json

JSON implementation for Ruby
https://ruby.github.io/json
Other
673 stars 326 forks source link

struct to json #593

Open dorianmariecom opened 1 month ago

dorianmariecom commented 1 month ago

Currently it gives:

>> s = Struct.new(:a).new(1)
>> s.to_json
=> "\"#<struct a=1>\""

Woudl be nice it was the same as a hash