-
-
Notifications
You must be signed in to change notification settings - Fork 796
JsonGenerator Features
Tatu Saloranta edited this page Nov 18, 2013
·
6 revisions
Jackson Streaming API has a set of on/off features that change the way streaming parsing is done.
Features can be directly enabled/disabled on JsonGenerator
instances, but more commonly default values are changed on JsonFactory
instances.
For example:
JsonFactory f = new JsonFactory();
f.enable(JsonGenerator.Feature.ESCAPE_NON_ASCII);
f.disable(JsonGenerator.Feature.AUTO_CLOSE_TARGET);
JsonGenerator g = f.createGenerator(destination);
p.enable(JsonGenerator.Feature.STRICT_DUPLICATE_DETECTION);
Settings can be divided in couple of loose categories, as follows.