In the last example, where does it find the values for the `married`, `age`, `zip` and `hobbies` attributes? They are not present in the JSON string?
class Person < Shale::Mapper
attribute :first_name, Shale::Type::String
attribute :last_name, Shale::Type::String
attribute :age, Shale::Type::Integer
attribute :married, Shale::Type::Boolean, default: false
attribute :hobbies, Shale::Type::String, collection: true
attribute :address, Address
end
And the JSON used for parsing also should contain those atttributes, like: {
"first_name": "John",
"last_name": "Doe",
"age": 30,
"married": false,
"hobbies": ["Singing", "Dancing"],
"address": {
"street": "Oxford Street",
"city": "London"
}
}