struct2json

Transform ruby structs composed of strings into json easily

USAGE

require 'struct2json' 

class Car < Struct.new(:color, :make, :model); end 
car = Car.new("blue", "honda", "civic") 
car.to_json

=> "{\"color\":\"blue\",\"make\":\"honda\",\"model\":\"civic\"}"

Contributing to struct2json

Copyright © 2012 Steven Zeiler. See LICENSE.txt for further details.