DEV Community

Discussion on: How to generate YAML from Ruby objects without type annotations

Collapse
 
ayushn21 profile image
Ayush Newatia

I think the main advantage would be you'd have fine grained control over which attributes are written to the YAML representation. I believe .to_json would write out all the instance variables right? That might not always be desireable ....