我有一个 Json,如下所示:-
{
"componentModelData": {
"modelNumber": "ABC",
"modelName": "",
"modelDescription": "",
"modelVendor": null,
"componentName": "HELO"
},
"revisionData": {
"revisionName": "rev12",
"revisionComment": "Comment",
"modifiedBy": "2323553"
},
"configData": [{"nodes":2085,"FxPOS-SX":16.5051,"FxPOS-SY":11.0479,"FxPOS-SZ":115.3421,"FxPOS-SXY":-13.8094,"FxPOS-SYZ":36.0105
},{"nodes":2085,"FxPOS-SX":16.5051,"FxPOS-SY":11.0479,"FxPOS-SZ":115.3421,"FxPOS-SXY":-13.8094,"FxPOS-SYZ":36.0105}]
}
数据映射程序
@Getter
@Setter
@JsonSerialize
@NoArgsConstructor
@AllArgsConstructor
public class DataMapping implements Serializable {
/**
*
*/
private static final long serialVersionUID = -2635323042843403966L;
@JsonProperty("componentModelData")
@Valid
public ComponentModelDTO componentModelDTO;
@JsonProperty("revisionData")
@Valid
public RevisionDTO revisionDTO;
@JsonProperty("configData")
private List<Object> configData;
}
我想将 configData 列表转换为List<HashMap<String,Double>> listString 是像'nodes,FxPOS-SX,FxPOS-SY'这样的键,值是它们各自的值。
任何人都可以帮助我如何实现这一目标?
明月笑刀无情
相关分类