switch (config.getNotation()) {
case NATURAL:
final JsonGenerator rawGenerator = new JsonFactory().createJsonGenerator(writer);
if (config.isHumanReadableFormatting()) {
rawGenerator.useDefaultPrettyPrinter();
}
final JsonGenerator bodyGenerator = writingList ? JacksonArrayWrapperGenerator.createArrayWrapperGenerator(rawGenerator, config.isRootUnwrapping() ? 0 : 1) : rawGenerator;
if (config.isRootUnwrapping()) {
return new Stax2JacksonWriter(JacksonRootStrippingGenerator.createRootStrippingGenerator(bodyGenerator, writingList ? 2 : 1), config, expectedType, jaxbContext);
} else {