Rescue JSON parsing on queries