| 程序包 | 说明 |
|---|---|
| org.noear.snack | |
| org.noear.snack.core | |
| org.noear.snack.from | |
| org.noear.snack.to |
| 限定符和类型 | 字段和说明 |
|---|---|
protected ONode |
ONodeData._n |
protected ONode |
OValue._n |
| 限定符和类型 | 字段和说明 |
|---|---|
List<ONode> |
ONodeData.array
节点数据的 array
|
Map<String,ONode> |
ONodeData.object
节点数据的 object
|
| 限定符和类型 | 方法和说明 |
|---|---|
ONode |
ONode.add(Object val)
添加数组子节点
|
<T> ONode |
ONode.addAll(Collection<T> ary)
添加数组子节点,将ary的成员点搬过来
|
<T> ONode |
ONode.addAll(Collection<T> ary,
BiConsumer<ONode,T> handler)
添加数组子节点,将ary的成员点搬过来,并交由代理处置
|
ONode |
ONode.addAll(ONode ary)
添加数组子节点,将ary的子节点搬过来
|
ONode |
ONode.addNew()
生成新的数组子节点
|
ONode |
ONode.addNode(ONode val)
添加数组子节点,值为ONode类型 (需要在外部初始化类型)
|
ONode |
ONode.asArray()
将节点切换为数组
|
ONode |
ONode.asNull()
将节点切换为null
|
ONode |
ONode.asObject()
将节点切换为对象
|
ONode |
ONode.asValue()
将节点切换为值
|
ONode |
ONode.attrForeach(BiConsumer<String,String> consumer)
遍历特性
|
ONode |
ONode.attrSet(String key,
String val)
设置特性
|
ONode |
ONode.build(Consumer<ONode> custom)
构建表达式
|
ONode |
ONode.fill(Object source)
填充数据(如有问题会跳过,不会出异常)
|
ONode |
ONode.fill(Object source,
Feature... features) |
ONode |
ONode.fillObj(Object source,
Feature... features) |
ONode |
ONode.fillStr(String source,
Feature... features) |
ONode |
ONode.forEach(BiConsumer<String,ONode> consumer)
遍历对象的子节点
|
ONode |
ONode.forEach(Consumer<ONode> consumer)
遍历数组的子节点
|
ONode |
ONode.get(int index)
获取数组子节点(超界,返回空节点) //支持倒数取
|
ONode |
ONode.get(String key)
获取对象子节点(不存在,生成新的子节点并返回)
|
ONode |
ONode.getNew(String key)
生成新的对象子节点,会清除之前的数据
|
ONode |
ONode.getOrNew(int index) |
ONode |
ONode.getOrNew(String key) |
ONode |
ONode.getOrNull(int index)
获取数组子节点(超界,返回null)
|
ONode |
ONode.getOrNull(String key)
获取对象子节点(不存在,返回null)
|
static ONode |
ONode.load(Object source)
加载数据并生成新节点(如果异常,会生成空ONode)
|
static ONode |
ONode.load(Object source,
Feature... features) |
static ONode |
ONode.load(Object source,
Options opts) |
static ONode |
ONode.load(Object source,
Options opts,
Fromer fromer) |
static ONode |
ONode.loadObj(Object source)
加载java object并生成新节点
|
static ONode |
ONode.loadObj(Object source,
Feature... features) |
static ONode |
ONode.loadObj(Object source,
Options opts) |
static ONode |
ONode.loadStr(String source)
加载string并生成新节点
|
static ONode |
ONode.loadStr(String source,
Feature... features) |
static ONode |
ONode.loadStr(String source,
Options opts) |
static ONode |
ONode.newArray() |
static ONode |
ONode.newObject() |
static ONode |
ONode.newValue() |
ONode |
ONode.options(Consumer<Options> custom)
定制选项
|
ONode |
ONode.options(Options opts)
切换选项
|
ONode |
ONode.rename(String key,
String newKey)
重命名一个子节点(如果不存在则跳过)
|
ONode |
ONode.select(String jpath) |
ONode |
ONode.select(String jpath,
boolean useStandard) |
ONode |
ONode.select(String jpath,
boolean useStandard,
boolean cacheJpath)
Json path select
|
ONode |
ONode.set(String key,
Object val)
设置对象的子节点(会自动处理类型)
|
<T> ONode |
ONode.setAll(Map<String,T> map)
设置对象的子节点,将map的成员搬过来
|
<T> ONode |
ONode.setAll(Map<String,T> map,
BiConsumer<ONode,T> handler)
设置对象的子节点,将map的成员搬过来,并交由代理处置
|
ONode |
ONode.setAll(ONode obj)
设置对象的子节点,将obj的子节点搬过来
|
ONode |
ONode.setNode(String key,
ONode val)
设置对象的子节点,值为ONode类型 (需要在外部初始化类型)
|
ONode |
ONode.val(Object val)
设置节点值
|
| 限定符和类型 | 方法和说明 |
|---|---|
List<ONode> |
ONodeData.array() |
List<ONode> |
ONode.ary()
获取节点数组数据结构体(如果不是数组,会自动转换)
|
Map<String,ONode> |
ONode.obj()
获取节点对象数据结构体(如果不是对象类型,会自动转换)
|
Map<String,ONode> |
ONodeData.object() |
| 限定符和类型 | 方法和说明 |
|---|---|
ONode |
ONode.addAll(ONode ary)
添加数组子节点,将ary的子节点搬过来
|
ONode |
ONode.addNode(ONode val)
添加数组子节点,值为ONode类型 (需要在外部初始化类型)
|
ONode |
ONode.setAll(ONode obj)
设置对象的子节点,将obj的子节点搬过来
|
ONode |
ONode.setNode(String key,
ONode val)
设置对象的子节点,值为ONode类型 (需要在外部初始化类型)
|
| 限定符和类型 | 方法和说明 |
|---|---|
<T> ONode |
ONode.addAll(Collection<T> ary,
BiConsumer<ONode,T> handler)
添加数组子节点,将ary的成员点搬过来,并交由代理处置
|
ONode |
ONode.build(Consumer<ONode> custom)
构建表达式
|
ONode |
ONode.forEach(BiConsumer<String,ONode> consumer)
遍历对象的子节点
|
ONode |
ONode.forEach(Consumer<ONode> consumer)
遍历数组的子节点
|
<T> ONode |
ONode.setAll(Map<String,T> map,
BiConsumer<ONode,T> handler)
设置对象的子节点,将map的成员搬过来,并交由代理处置
|
| 构造器和说明 |
|---|
ONodeData(ONode n) |
OValue(ONode n) |
| 限定符和类型 | 方法和说明 |
|---|---|
static ONode |
JsonPath.eval(ONode source,
String jpath,
boolean useStandard,
boolean cacheJpath) |
| 限定符和类型 | 方法和说明 |
|---|---|
T |
NodeDecoder.decode(ONode node,
Type type) |
T |
NodeDecoderEntity.decode(ONode source,
Type type) |
void |
NodeEncoderEntity.encode(T source,
ONode target) |
void |
NodeEncoder.encode(T data,
ONode node) |
static ONode |
JsonPath.eval(ONode source,
String jpath,
boolean useStandard,
boolean cacheJpath) |
| 构造器和说明 |
|---|
Context(Options options,
ONode node,
Type type0)
用于去处的构造
|
| 限定符和类型 | 方法和说明 |
|---|---|
void |
JsonFromer.analyse(Context ctx,
CharReader sr,
CharBuffer sBuf,
ONode p) |
| 限定符和类型 | 方法和说明 |
|---|---|
void |
JsonToer.analyse(Options opts,
ONode o,
StringBuilder sb) |
Object |
ObjectToer.analyseBean(Context ctx,
ONode o,
Class<?> clz,
Type type,
Map<TypeVariable,Type> genericInfo) |
Object |
ObjectToer.analyseCollection(Context ctx,
ONode o,
Class<?> clz,
Type type,
Map<TypeVariable,Type> genericInfo) |
Object |
ObjectToer.analyseMap(Context ctx,
ONode o,
Class<?> clz,
Type type,
Map<TypeVariable,Type> genericInfo) |
Copyright © 2021. All rights reserved.