JSON decode

* Added json decode with error reporting