add error cases for JSON parsing