Examples of treeToValue()


Examples of com.fasterxml.jackson.databind.ObjectMapper.treeToValue()

            if (args != null) {
                Iterator<JsonNode> iterator = args.elements();
                if (iterator.hasNext()) {
                    JsonNode node = iterator.next();
                    Class<?> eventClass = eventMapping.get(eventName);
                    Object arg = mapper.treeToValue(node, eventClass);
                    eventArgs.add(arg);
                    while (iterator.hasNext()) {
                        node = iterator.next();
                        arg = mapper.treeToValue(node, Object.class);
                        eventArgs.add(arg);
View Full Code Here

Examples of com.fasterxml.jackson.databind.ObjectMapper.treeToValue()

                    Class<?> eventClass = eventMapping.get(eventName);
                    Object arg = mapper.treeToValue(node, eventClass);
                    eventArgs.add(arg);
                    while (iterator.hasNext()) {
                        node = iterator.next();
                        arg = mapper.treeToValue(node, Object.class);
                        eventArgs.add(arg);
                    }
                }
            }
            return event;
View Full Code Here

Examples of com.fasterxml.jackson.databind.ObjectMapper.treeToValue()

//                    }
//                    if (clazz.equals(Float.class)) {
//                        val = (float)arg.doubleValue();
//                    }
//                }
                val = mapper.treeToValue(arg, clazz);
                args.add(val);
                i++;
            }
            return result;
        }
View Full Code Here

Examples of com.fasterxml.jackson.databind.ObjectMapper.treeToValue()

                    if (i > eventClasses.size() - 1) {
                        log.debug("Event {} has more args than declared in handler: {}", eventName, args);
                        break;
                    }
                    Class<?> eventClass = eventClasses.get(i);
                    Object arg = mapper.treeToValue(node, eventClass);
                    eventArgs.add(arg);
                    i++;
                }
            }
            return event;
View Full Code Here

Examples of com.fasterxml.jackson.databind.ObjectMapper.treeToValue()

                    }
                    if (clazz.equals(Float.class)) {
                        val = (float)arg.doubleValue();
                    }
                }
                val = mapper.treeToValue(arg, clazz);
                args.add(val);
            }
            return result;
        }
View Full Code Here

Examples of com.fasterxml.jackson.databind.ObjectMapper.treeToValue()

            if (args != null) {
                Iterator<JsonNode> iterator = args.elements();
                if (iterator.hasNext()) {
                    JsonNode node = iterator.next();
                    Class<?> eventClass = eventMapping.get(eventName);
                    Object arg = mapper.treeToValue(node, eventClass);
                    eventArgs.add(arg);
                    while (iterator.hasNext()) {
                        node = iterator.next();
                        arg = mapper.treeToValue(node, Object.class);
                        eventArgs.add(arg);
View Full Code Here

Examples of com.fasterxml.jackson.databind.ObjectMapper.treeToValue()

                    Class<?> eventClass = eventMapping.get(eventName);
                    Object arg = mapper.treeToValue(node, eventClass);
                    eventArgs.add(arg);
                    while (iterator.hasNext()) {
                        node = iterator.next();
                        arg = mapper.treeToValue(node, Object.class);
                        eventArgs.add(arg);
                    }
                }
            }
            return event;
View Full Code Here

Examples of com.fasterxml.jackson.databind.ObjectReader.treeToValue()

      if (entity != null && Utils.isJsonType(entity.getContentType().getValue())) {
        JsonNode jsonNode = reader.readTree(entity.getContent());
        if (jsonNode != null) {
          JsonNode rates = jsonNode.get("rates");
          if (rates != null) {
            map = reader.treeToValue(rates, Map.class);
            s.setId(FXRATES_KEY);
            s.setProperties(map);
//            s.addProperty("fetched", Utils.formatDate("dd MM yyyy HH:mm", Locale.UK));
            dao.create(s);
          }
View Full Code Here

Examples of com.fasterxml.jackson.databind.ObjectReader.treeToValue()

      if (entity != null && isJSON(entity.getContentType().getValue())) {
        JsonNode jsonNode = reader.readTree(entity.getContent());
        if (jsonNode != null) {
          JsonNode rates = jsonNode.get("rates");
          if (rates != null) {
            map = reader.treeToValue(rates, Map.class);
            s.setId(Config.FXRATES_KEY);
            s.setProperties(map);
//            s.addProperty("fetched", Utils.formatDate("dd MM yyyy HH:mm", Locale.UK));
            dao.create(s);
          }
View Full Code Here

Examples of com.fasterxml.jackson.databind.ObjectReader.treeToValue()

      if (entity != null && isJSON(entity.getContentType().getValue())) {
        JsonNode jsonNode = reader.readTree(entity.getContent());
        if (jsonNode != null) {
          JsonNode rates = jsonNode.get("rates");
          if (rates != null) {
            map = reader.treeToValue(rates, Map.class);
            s.setId(Config.FXRATES_KEY);
            s.setProperties(map);
//            s.addProperty("fetched", Utils.formatDate("dd MM yyyy HH:mm", Locale.UK));
            dao.create(s);
          }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.