i have a Json output like this :
The numbers 2922 and 3910 are random numbers. How can i store all values that are in \"name\" in an array?
Thank yo
You can use the jackson tool to conver json to pojo Below is the snippet of code
public void parse(String json) {
JsonFactory factory = new JsonFactory();
ObjectMapper mapper = new ObjectMapper(factory);
JsonNode rootNode = mapper.readTree(json);
Iterator> fieldsIterator = rootNode.fields();
while (fieldsIterator.hasNext()) {
Map.Entry field = fieldsIterator.next();
System.out.println("Key: " + field.getKey() + "\tValue:" + field.getValue());
}
}
HapPy C@ding..!!