Major cleanup in DecodeJson.