Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

JSON-encode post args that are python dicts #88

Open
rafitorres opened this issue Sep 5, 2013 · 1 comment
Open

JSON-encode post args that are python dicts #88

rafitorres opened this issue Sep 5, 2013 · 1 comment
Milestone

Comments

@rafitorres
Copy link

Certain write operations in the Facebook API require post arguments that are JSON objects. Example: adgroup creation in the ads API (https://developers.facebook.com/docs/reference/ads-api/adgroup/#create) which expects certain objects such as conversion_specs, targeting, and tracking_specs.

When using put_object, if one passes a python dict as one of these arguments the call will fail with a "malformed JSON" or similar message. I got around it by doing a json.dumps() on each before passing them to put_object.

Don't know if the the library should handle this encoding or if it's out of scope, but FYI.

@martey martey added this to the v1.0.0 milestone Feb 10, 2014
@martey
Copy link
Member

martey commented Jun 24, 2014

#108 describes a similar issue to this. As I wrote in the comments there, I think changing the library to use Python dictionaries directly (instead of args and kwargs) makes sense.

@martey martey modified the milestones: v2.0.0, v1.0.0 Jun 5, 2015
@martey martey modified the milestones: v1.0.0, v2.0.0 Sep 6, 2015
@martey martey modified the milestones: v2.0.0, v1.0.0 Sep 22, 2015
@martey martey modified the milestones: v3.0.0, v2.0.0 Aug 7, 2016
@martey martey modified the milestones: v3.0.0, v4.0.0 Jul 19, 2018
@martey martey modified the milestones: v4.0.0, v5.0.0 Jul 28, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants