com.github.cosycode.ext.se.json.JsonObj Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of extend-mod Show documentation
Show all versions of extend-mod Show documentation
扩展模块, 用于存放一些非常用的工具或模块的扩展类, 例如在poi基础上扩展的excel的导入模块, 模拟按键模块
The newest version!
package com.github.cosycode.ext.se.json;
import com.google.gson.JsonElement;
import com.google.gson.JsonObject;
import java.util.Set;
/**
* Description :
*
* created in 2023/2/21
*
*
* @author CPF
* @since 0.2.3
**/
public interface JsonObj extends JsonNode {
Set keySet();
int size();
class GsonObj extends GsonNode implements JsonObj {
private final JsonObject jsonObject;
public GsonObj(JsonObject jsonObject) {
this.jsonObject = jsonObject;
}
@Override
public JsonElement getJsonElement() {
return jsonObject;
}
@Override
public Set keySet() {
return jsonObject.keySet();
}
@Override
public int size() {
return jsonObject.size();
}
}
}