Jackson Object Mapper to conver String to JsonNode
Following are some of the code snippet for Jackson Object Mapper
Convert String to JsonNode Object
Convert String to JsonNode Object
String data;
JsonNode jsonNode = getObjectMapper().readTree(data);
Convert an Object to JSON String
String jsonString = getObjectMapper().writeValueAsString(object);
Convert InputStream to JsonNode Object
InputStream inputStream;
JsonNode jsonNode = getObjectMapper().readTree(inputStream);
Comments
Post a Comment