wrap the json parse generate to capture exceptions