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);
}
}
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);
}
}
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);
}
}
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);
}
}
Aggregations