比如有个这样的 response
{
"examinationStatus":{
"absent":false,
"noAbsent":true
},
"grades":{
"math":90
}
}
然后我要返回的数据类型是这样的
{
"isAbsent":false,
"grades":{
"math":"优秀"
}
}
现在小组里的代码是将第一个 Json String 转成 map ,然后一堆 if 判断,将值塞到一个对象里去,一百多行了,看起来真的难受,想请教下有没有没有比较好的优化方案
