json: refine whitespace rules to avoid runaways
#7866
Merged
json: refine whitespace rules to avoid runaways
#7866