public class StructureConvert extends MaplEach implements MaplConvert
将一种MapList结构转换成另外一种MapList结构.例:
{ "age":"123", "name":"juqkai" } 转换成: { "年龄":"123", "姓名":"juqkai" }
要进行这样的转换需要预先配置一个对应关系的配置, 具体的配置关系说明如下:
例:
例1: { "age":"user.年龄", "name":["user.name", "user.姓名"] } 例2(原json:[{"name":"nutz"},{"name":"juqkai"}]): [{ "name":"[].姓名" }] 例3: { users:[ { "name":["people[].name", "users[].name"], "age":"users[].name" } ] }
arrayIndex, paths
构造器和说明 |
---|
StructureConvert(Object obj) |
StructureConvert(Reader reader) |
StructureConvert(String path) |
Copyright © 2017. All rights reserved.