Search in sources :

Example 1 with ValueNode

use of com.fasterxml.jackson.databind.node.ValueNode in project charts by vaadin.

the class DataProviderSeriesBeanSerializer method addNamedValue.

private void addNamedValue(ObjectNode data, String name, Optional<Object> value) {
    if (value.isPresent()) {
        ValueNode node = JsonNodeFactory.instance.pojoNode(value.get());
        data.set(name, node);
    }
}
Also used : ValueNode(com.fasterxml.jackson.databind.node.ValueNode)

Example 2 with ValueNode

use of com.fasterxml.jackson.databind.node.ValueNode in project charts by vaadin.

the class DataProviderSeriesBeanSerializer method addValue.

private void addValue(ArrayNode data, Optional<Object> value) {
    if (value.isPresent()) {
        ValueNode node = JsonNodeFactory.instance.pojoNode(value.get());
        data.add(node);
    }
}
Also used : ValueNode(com.fasterxml.jackson.databind.node.ValueNode)

Example 3 with ValueNode

use of com.fasterxml.jackson.databind.node.ValueNode in project charts by vaadin.

the class ContainerDataSeriesBeanSerializer method addValue.

private void addValue(ArrayNode data, Property<?> itemProperty) {
    Objects.requireNonNull(itemProperty);
    Object value = itemProperty.getValue();
    if (value != null) {
        ValueNode node = JsonNodeFactory.instance.pojoNode(itemProperty.getValue());
        data.add(node);
    }
}
Also used : ValueNode(com.fasterxml.jackson.databind.node.ValueNode)

Example 4 with ValueNode

use of com.fasterxml.jackson.databind.node.ValueNode in project charts by vaadin.

the class ContainerDataSeriesBeanSerializer method addNamedValue.

private void addNamedValue(ObjectNode data, String name, Property<?> itemProperty) {
    Objects.requireNonNull(itemProperty);
    Objects.requireNonNull(name);
    Objects.requireNonNull(data);
    Object value = itemProperty.getValue();
    if (value != null) {
        ValueNode node = JsonNodeFactory.instance.pojoNode(itemProperty.getValue());
        data.set(name, node);
    }
}
Also used : ValueNode(com.fasterxml.jackson.databind.node.ValueNode)

Aggregations

ValueNode (com.fasterxml.jackson.databind.node.ValueNode)4