I need to get codec value from jsonnode using java. The following is the jsonnode with parent and child nodes.
{
"DetectedProperties":{
"Bitrate":262610704,
"FrameRate":"24/1",
"FileSize":32827252,
"Height":1080,
"Width":1920,
"DurationMillis":1.0,
"codec":"prores"
}
}
the the following code snipet doesn't return a value for codec. It always returns null.
JsonNode videoProperties = getCodecInfo(videoFile);
JsonNode videoInfo = videoProperties.get("DetectedProperties");
log.debug("codec: " + videoInfo.get("codec").toString()); // returns null
How to get the codec value from the above json using java?
Kindly provide your inputs.