Is there a way to get jBuilder to generate a Hash from a template instead of a string?
render(template: "foo", formats: :json) will return stringified JSON.
I can of course parse the stringified JSON, though it's sub-optimal to render JSON as a string and then parse it again. My assumption is that the JSON does exist as a Hash at some point before being turned into a string.
For example, given a jBuilder template like this:
json.foo "bar"
I would like to know how to get jBuilder to generate {foo: "bar"} instead of "{\"foo\":\"bar\"}"