io.infinicast.JsonHelpers Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of infinicast-client-jdk8 Show documentation
Show all versions of infinicast-client-jdk8 Show documentation
Infinicast SDK to communicate with the cloud.
package io.infinicast;
import com.fasterxml.jackson.databind.ObjectMapper;
import com.fasterxml.jackson.databind.node.JsonNodeFactory;
import com.fasterxml.jackson.databind.node.ObjectNode;
import java.io.IOException;
public class JsonHelpers {
public static ObjectNode parse(String rhs) {
ObjectMapper mapper = new ObjectMapper();
try {
ObjectNode node = mapper.readValue(rhs, ObjectNode.class);
return node;
} catch (IOException e) {
}
return null;
}
public static ObjectNode createObject() {
return new ObjectNode(JsonNodeFactory.instance);
}
}