Package com.facebook.presto.jdbc.internal.jackson.databind.jsonFormatVisitors

Examples of com.facebook.presto.jdbc.internal.jackson.databind.jsonFormatVisitors.JsonStringFormatVisitor


    {
        // [JACKSON-684]: serialize as index?
      if (visitor.getProvider().isEnabled(SerializationFeature.WRITE_ENUMS_USING_INDEX)) {
        visitor.expectIntegerFormat(typeHint);
      } else {
        JsonStringFormatVisitor stringVisitor = visitor.expectStringFormat(typeHint);
        if (typeHint != null && visitor != null) {
          if (typeHint.isEnumType()) {
          // important: ensure that order is retained
            Set<String> enums = new LinkedHashSet<String>();
            for (SerializedString value : _values.values()) {
              enums.add(value.getValue());
            }
            stringVisitor.enumTypes(enums);
          }
        }
      }
    }
View Full Code Here


            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()) {
            Set<String> enums = new LinkedHashSet<String>();
            for (SerializableString value : _values.values()) {
              enums.add(value.getValue());
            }
            stringVisitor.enumTypes(enums);
          }
        }
        }
    }
View Full Code Here

   
    @Override
    public void acceptJsonFormatVisitor(JsonFormatVisitorWrapper visitor, JavaType typeHint)
            throws JsonMappingException
    {
        JsonStringFormatVisitor v2 = (visitor == null) ? null : visitor.expectStringFormat(typeHint);
        if (v2 != null) {
            v2.format(JsonValueFormat.DATE_TIME);
        }
    }
View Full Code Here

TOP

Related Classes of com.facebook.presto.jdbc.internal.jackson.databind.jsonFormatVisitors.JsonStringFormatVisitor

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.