dewski / json_builder

Rails provides an excellent XML Builder by default to build RSS and ATOM feeds, but nothing to help you build complex and custom JSON data structures. JSON Builder is here to help.
http://garrettbjerkhoel.com/json_builder/
MIT License
244 stars 52 forks source link

Generating ruby objects (hashes and arrrays) from json_builder templates #50

Open D1plo1d opened 10 years ago

D1plo1d commented 10 years ago

Is it possible to generate a ruby object (either a nesting of arrays or hashes or both) from a json_builder template?

I want to reuse my existing json_builder templates to generate multipart form post payloads with rest-client. My fallback plan is to generate JSON with json_builder and then parse it back into ruby objects and send that to rest-client but it seems less then elegant.