{
// [JACKSON-684]: serialize as index?
if (_serializeAsIndex(visitor.getProvider())) {
JsonIntegerFormatVisitor v2 = visitor.expectIntegerFormat(typeHint);
if (v2 != null) { // typically serialized as a small number (byte or int)
v2.numberType(JsonParser.NumberType.INT);
}
} else {
JsonStringFormatVisitor stringVisitor = visitor.expectStringFormat(typeHint);
if (typeHint != null && stringVisitor != null) {
if (typeHint.isEnumType()) {