I have a class like the following
class Foo
JSON.mapping(
bar: String,
baz: String,
)
end
I know that I can wrap single attributes in JSON objects by specifying {root: "name of node"}
inside of JSON.mapping. But is there any way to do it for the entire Foo
class?
So that the output would look like this?
{
"foo": {
"bar": "",
"baz": ""
}
}