有如下数据:
{
"AudioLayer.1.ValidChannel": "all",
"AudioLayer.1.VolumeRate": 1,
"AudioLayer.2.ValidChannel": "all",
"AudioLayer.2.VolumeRate": 1,
"BlendList.1": "RV02",
"BlendList.2": "RV03",
"CasterId": "ee08253d-d113-4a0b-9690-61ff3d798b62",
"LayoutId": undefined,
"MixList.1": "RV02",
"MixList.2": "RV03",
"VideoLayer.1.FillMode": "fit",
"VideoLayer.1.HeightNormalized": 1,
"VideoLayer.1.PositionNormalized.1": 0,
"VideoLayer.1.PositionNormalized.2": 0,
"VideoLayer.1.PositionRefer": "topLeft",
"VideoLayer.1.WidthNormalized": 0.5,
"VideoLayer.2.FillMode": "fit",
"VideoLayer.2.HeightNormalized": 1,
"VideoLayer.2.PositionNormalized.1": 0.5,
"VideoLayer.2.PositionNormalized.2": 0,
"VideoLayer.2.PositionRefer": "topLeft",
"VideoLayer.2.WidthNormalized": 0.5,
}
需要转换成,下面的格式,需要怎么做啊?
{
"AudioLayer": [
{
"ValidChannel": "all",
"VolumeRate": 1
},
{
"ValidChannel": "all",
"VolumeRate": 1
}
],
"BlendList": [
"RV02",
"RV03"
],
"CasterId": "ee08253d-d113-4a0b-9690-61ff3d798b62",
"MixList": [
"RV02",
"RV03"
],
"VideoLayer": [
{
"FillMode": "fit",
"HeightNormalized": 1,
"PositionNormalized": [
0,
0
],
"PositionRefer": "topLeft",
"WidthNormalized": 0.5
},
{
"FillMode": "fit",
"HeightNormalized": 1,
"PositionNormalized": [
0.5,
0
],
"PositionRefer": "topLeft",
"WidthNormalized": 0.5
}
]
}