Added a json writer to modelreader.py