Implement #as_json or expand Clear JSON Deserialise model to accept annotation as macro arg in
examples
defining to_json(json : JSON::Builder) would be the best way to go instead of to_h/as_json
It might be helpful to get some ideas from how active-model does it.
https://github.com/spider-gazelle/active-model/blob/master/src/active-model/model.cr#L62-L84
Originally posted by @caspiano in #80 (comment)
Implement #as_json or expand Clear JSON Deserialise model to accept annotation as macro arg in
examples
https://github.com/place-labs/staff-api/blob/c099e3befe407b8a2c6c8a3958d704706c19fa4b/src/models/tenant.cr#L67-L74
https://github.com/place-labs/staff-api/blob/c099e3befe407b8a2c6c8a3958d704706c19fa4b/src/models/booking.cr#L151-L159
Implement #as_json for 1, 2