Fix comments and unittest for market.py and style

Trying to make the right commit to  the develop branch.
The source code of `json.loads` is [here](https://hg.python.org/cpython/file/ee879c0ffa11/Lib/json/__init__.py) but isn't helpful. As you see, it delegates to [decode](https://hg.python.org/cpython/file/ee879c0ffa11/Lib/json/decoder.py#l361) which may raise a `ValueError` and also delegates to `raw_decode`, which also may raise a `ValueError`. At this point, I declare we 've flexed our code-reading muscles enough to decide a `ValueError` should be caught.