nkgilley / python-ecobee-api

Python API for controlling Ecobee Thermostats
MIT License
44 stars 40 forks source link

Use simplejson if available, similar to requests #48

Closed jjlawren closed 4 years ago

jjlawren commented 4 years ago

A followup to #47. If an installation has simplejson installed, requests will prefer that module over the built-in json. Unfortunately, this will also change the exception caught in #47 to simplejson.errors.JSONDecodeError. This PR imports json in the same manner as requests so the namespaces line up properly.

Went ahead and bumped the version, too.

jjlawren commented 4 years ago

If both this and #49 are mergeable, I'd suggesting merging #49 first to combine into a single release.

marthoc commented 4 years ago

This one is straightforward and makes sense.