Strip extraneous whitespace in API JSON responses (bug 914876)