Anyway, what you really wanna do (and that is documented in the README) is this.
module ServiceRepresenter
include Roar::Representer::JSON::HAL
collection :services, embedded: true do
property :id
end
end
The incoming document is a valid HAL document, so you need a HAL representer! One requirement here, though. The represented object needs a services accessor, though.
OpenStruct.new.extend(ServiceRepresenter).from_json "..".services #=> [..]
This is the generic way using the HAL representer. I can't think of a way to tell Roar to parse the embedded services keys as a lonely collection. Does the above stuff work of for you?