kgiszczak / shale

Shale is a Ruby object mapper and serializer for JSON, YAML, TOML, CSV and XML. It allows you to parse JSON, YAML, TOML, CSV and XML data and convert it into Ruby data structures, as well as serialize data structures into JSON, YAML, TOML, CSV or XML.
https://shalerb.org/
MIT License
618 stars 19 forks source link

command line for converting between types #19

Closed electriquo closed 1 year ago

electriquo commented 1 year ago

Is there a Shale wrapper or command line utility that converts between types? E.g. YAML <=> JSON <=> CSV <=> TOML <=> XML

If such one exist it will be awesome.

kgiszczak commented 1 year ago

No that I know of. You would need to define mappings and call to_ and from_ methods by hand.

electriquo commented 1 year ago

Thank you for the quick response @kgiszczak. I thought you might have a trick in your sleeve for converting between types without coding much.