Skip to content

Add support for parsing JSON objects using glom #129

Description

@prkumar

Is your feature request related to a problem? Please describe.
glom is a library that provides a lot of neat functionality in terms of parsing nested structures, like JSON objects.

Describe the solution you'd like
We can introduce a parser argument for @uplink.returns.json that supports custom parsing strategies for JSON responses:

@uplink.returns.json(key="a.b.c", parser="glom")

Further, glom provides support for converting dictionary-like objects into objects, which seems like a great fit for adding a custom ConverterFactory for glom, too.

Additional context
This issue is related to feedback provided by @liiight through the Uplink Gitter lobby: https://gitter.im/python-uplink/Lobby?at=5c1a04f7b4ef82024857910d. @liiight also proposed exposing a specific decorator for glom:

@uplink.returns.glom('a.b.c')

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

    Projects

    No projects

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions