If I have a map like this
{"media.video.one"="hello", "media.video.two"="world", "media.audio.one"="hi"}
or
{"/media/video/one"="hello", "/media/video/two"="world", "/media/audio/one"="hi"}
Is it possible to convert this into JSON using Jackson and ObjectMapper APIs like this?
{
"media": {
"video": {
"one": "hello",
"two": "hello"
},
"auido": {
"one": "hi"
}
}
}
Or how I can do this in code?
I found something similar in JS here: https://stackoverflow.com/a/37438096/6024354