I'm trying to consume an API that returns data in the format below but I can't seem to get parse_root_in_json to parse it properly. Any ideas why this isn't returning anything?
// GET /users
{
"data": [{"id": 1234, first_name: "user1"}, {"id": 1234, first_name: "user1"}, ...]
}
My model:
class User
include Her::Model
parse_root_in_json :data
end
I've also tried parse_root_in_json true, format: :active_model_serializers and root_element :data but nothing seems to work
I'm trying to consume an API that returns data in the format below but I can't seem to get parse_root_in_json to parse it properly. Any ideas why this isn't returning anything?
My model:
I've also tried
parse_root_in_json true, format: :active_model_serializersandroot_element :databut nothing seems to work