Here is a JSON model that I am working with:
{
"loggers" : {
"logger1" : {
"name" : "logger1",
"level" : "DEBUG",
"sub_loggers" :{
"logger1.nested_logger1" : {
"name": "logger1.nested_logger1",
"level": "INFO"
},
"logger1.nested_logger2" : {
"name": "logger1.nested_logger2",
"level": "INFO",
"sub_loggers": {
"logger1.nested_logger2.more_of_that" : {
"name": "logger1.nested_logger2.more_of_that",
"level": "INFO"
}
}
}
}
},
"logger2" : {
"name": "logger2",
"level": "WARN"
}
}
}
I am trying to store this model in a variable after receiving it from an HTTP request, but I would like to map it instead of using any
.
If possible, I would also like to split it into 2 separate models. However, I am facing challenges with mapping because the key names within sub_loggers
are not in an array format, but rather represent the loggers directly.