marcuz / libpynexmo

Python library to interact with Nexmo SMS API
BSD 2-Clause "Simplified" License
63 stars 34 forks source link

Ensure compatibility with JSON library on Python < 2.7 #16

Closed daniele-athome closed 10 years ago

daniele-athome commented 10 years ago

JSON module has no load() method. This patch reads the whole response body and passes it to the read() method only if load() is not found.

Signed-off-by: Daniele Ricci daniele.athome@gmail.com

daniele-athome commented 10 years ago

Any chance to see this merged?

marcuz commented 10 years ago

Could you bring me an example of which Python and json versions it affects?

daniele-athome commented 10 years ago

Actually I implemented this blindly because I was porting the same modification I applied to the old nexmomessage class (before libpynexmo was reborn as an actual repository). I can't reproduce it any more because I realized that, after an upgrade to my server, the JSON library has all the required methods. Sorry for bothering.

marcuz commented 10 years ago

Cool, thanks for the feedback!