You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I have a JSONAPI endpoint that returns nested value objects, such as a contact. Wondering if there's a way to express that here, or if jsonapi-requests only supports primitives?
Example:
class LogisticsDelivery(jsonapi_requests.orm.ApiModel):
class Meta:
type = 'logistics-deliveries'
api = api
contact = jsonapi_requests.orm.AttributeField('contact')
deliveries = LogisticsDelivery.get_list()
for delivery in deliveries:
pprint(delivery.contact)
What I'd love is to be able to define a data class that could wrap this dictionary in a real object, that would allow for getting / setting.
The text was updated successfully, but these errors were encountered:
joegaudet
changed the title
Is there a way to have an attribute defined as a struct of some sort.
Is there a way to have an attribute defined as a struct of some sort?
Feb 28, 2020
I have a JSONAPI endpoint that returns nested value objects, such as a contact. Wondering if there's a way to express that here, or if jsonapi-requests only supports primitives?
Example:
Which outputs
What I'd love is to be able to define a data class that could wrap this dictionary in a real object, that would allow for getting / setting.
The text was updated successfully, but these errors were encountered: