8000 Resource objects should support json.dumps · Issue #88 · twilio/twilio-python · GitHub
[go: up one dir, main page]

Skip to content
Resource objects should support json.dumps #88
Closed
@kevinburke

Description

@kevinburke

Or, some kind of object.to_json() method which would give you the original JSON. Right now trying to make a server-side API request and just pass through the JSON response is difficult, without resorting to Requests or similar.

It would also be nice if printing a message returned its JSON representation. Right now you get

>>>> msg = client.sms.messages.get('SM123')
>>>> msg
<twilio.rest.resources.SmsMessage at 0x101fa6a90>

Which doesn't tell you much at a glance.

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

      0