Package com.fasterxml.jackson.core

Examples of com.fasterxml.jackson.core.ObjectCodec


    @Override
    public EventDetails deserialize(final JsonParser jp, final DeserializationContext ctxt)
        throws IOException, JsonProcessingException
    {
        ObjectCodec oc = jp.getCodec();
        JsonNode node = oc.readTree(jp);
        return getDetails(node);
    }
View Full Code Here


  @Override
  public JobParameter deserialize(JsonParser jsonParser, DeserializationContext deserializationContext)
      throws IOException,
      JsonProcessingException {
    ObjectCodec oc = jsonParser.getCodec();
    JsonNode node = oc.readTree(jsonParser);

    final String value = node.get("value").asText();
    final boolean identifying = node.get("identifying").asBoolean();
    final String type = node.get("type").asText();
View Full Code Here

  @Override
  public Geometry deserialize(JsonParser jp, DeserializationContext ctxt)
      throws IOException, JsonProcessingException {

    ObjectCodec oc = jp.getCodec();
    JsonNode root = oc.readTree(jp);
    return parseGeometry(root);
  }
View Full Code Here

    @Override
    public Localized deserialize(final JsonParser parser,
                                         final DeserializationContext context)
            throws IOException {
        final LocalizedBuilder<Object> builder = new LocalizedBuilder<>();
        final ObjectCodec codec = parser.getCodec();
        final JsonNode node = codec.readTree(parser);
        final Iterator<Map.Entry<String, JsonNode>> iterator = node.fields();
        while (iterator.hasNext()) {
            final Map.Entry<String, JsonNode> entry = iterator.next();
            builder.setValue(
                    Locale.forLanguageTag(entry.getKey()),
View Full Code Here

    @Override
    public LocalDateTime deserialize(final JsonParser parser,
                                     final DeserializationContext context)
            throws IOException {
        final ObjectCodec codec = parser.getCodec();
        final JsonNode node = codec.readTree(parser);
        return LocalDateTime.parse(node.asText(), DATE_TIME_FORMATTER);
    }
View Full Code Here

            }
        }
        // can use this to approximate error location if a sub-method throws an exception
        JsonLocation currentLocation = jp.getTokenLocation();
        JsonNode jsonNode = jp.readValueAsTree();
        ObjectCodec objectCodec = jp.getCodec();

        try {
            Object bean = null;
            // _array handler
            if (jsonNode.isArray()) {
View Full Code Here

    public boolean handleUnknownProperty(DeserializationContext ctxt,
                                         JsonParser jp,
                                         JsonDeserializer<?> deserializer,
                                         Object beanOrClass,
                                         String propertyName) throws IOException, JsonProcessingException {
        ObjectCodec objectCodec = jp.getCodec();
        if (objectCodec instanceof ObjectMapper) {
            ObjectMapper objectMapper = (ObjectMapper) objectCodec;
            BeanDescription beanDescription =
                    objectMapper.getSerializationConfig().introspect(ctxt.constructType(beanOrClass.getClass()));
            for (BeanPropertyDefinition propertyDefinition : beanDescription.findProperties()) {
View Full Code Here

        String classField = pluginMap.classField();
        JsonToken currentToken = jp.getCurrentToken();
        // can use this to approximate error location if a sub-method throws an exception
        JsonLocation currentLocation = jp.getTokenLocation();
        JsonNode jsonNode = jp.readValueAsTree();
        ObjectCodec objectCodec = jp.getCodec();

        try {
            Object bean = null;
            // _array handler
            if (jsonNode.isArray()) {
View Full Code Here

    }

    @Override
    protected BsonParser _createParser(InputStream in, IOContext ctxt) {
        BsonParser p = new MongoBsonParser(ctxt, _parserFeatures, _bsonParserFeatures, in);
        ObjectCodec codec = getCodec();
        if (codec != null) {
            p.setCodec(codec);
        }
        return p;
    }
View Full Code Here

        ctxt.setEncoding(enc);
        if (enc == JsonEncoding.UTF8 && _outputDecorator != null) {
            out = _outputDecorator.decorate(ctxt, out);
        }
        BsonGenerator g = new MongoBsonGenerator(_generatorFeatures, _bsonGeneratorFeatures, out);
        ObjectCodec codec = getCodec();
        if (codec != null) {
            g.setCodec(codec);
        }
        return g;
    }
View Full Code Here

TOP

Related Classes of com.fasterxml.jackson.core.ObjectCodec

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.