test all kinds of escape characters for jsonwriter and fix some errors found due to testing;