json sanitization improvements