Skip to main content

Unwrap JSON responses from callback fns

Project description

# unwrap [![Build Status](https://travis-ci.org/shaunvxc/unwrap.svg?branch=master)](https://travis-ci.org/shaunvxc/unwrap) [![PyPI version](https://badge.fury.io/py/unwrapper.svg)](https://badge.fury.io/py/unwrapper)

`unwrapper` is a small utility for unwrapping the callback function from an otherwise easily parseable `json` string.

###Usage
Simply pass the in the string to be unwrapped:

```python
from unwrapper import unwrap

x = unwrap("json13123({'a':1, 'b': 2, 'c': 3})")
# x is {u'a': 1, u'c': 3, u'b': 2}
```

And you will get back a parsed json dictionary.

####Command Line

`$ curl "SOME CURL REQUEST RETURNING WRAPPED JSON" | unwrap`

###Installation

`$ pip install unwrapper`

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

unwrapper-0.0.8.tar.gz (3.6 kB view hashes)

Uploaded Source

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page