read json as ordered dict. Began error handling.