Added additional functionality to have to_param and json serialization