throw ioexeption when json is not valid