Made all writing methods use the parameter order in, out, to be more consistent. Made wirteJSONString public, so other modules reuse it. Made it possible to write control characters by escaping them with unicode escapes, which JSON allows.