Invalid characters can cause JSON formatting errors