Skip to content

How to get the response in true JSON? #287

Description

@jerinpetergeorge

How can I transform the below Customer instance into a JSON?

unit = Unit(settings.UNIT_API_DOMAIN, settings.UNIT_API_KEY)
customer = unit.customers.get("2331163")


json.dumps(customer) # TypeError: Object of type UnitResponse is not JSON serializable

I was expecting some sort of utility functions that convert the entire object (by traversing through the whole object) to a JSON

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions