add Json helper class that properly throws exceptions on error