优化
This commit is contained in:
@@ -42,6 +42,10 @@ public class JsonArray extends ArrayList<Object> implements JsonElement {
|
|||||||
return JsonConvert.root().convertFrom(JsonArray.class, text, offset, length);
|
return JsonConvert.root().convertFrom(JsonArray.class, text, offset, length);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public static JsonArray create() {
|
||||||
|
return new JsonArray();
|
||||||
|
}
|
||||||
|
|
||||||
public JsonArray append(Object value) {
|
public JsonArray append(Object value) {
|
||||||
super.add(value);
|
super.add(value);
|
||||||
return this;
|
return this;
|
||||||
|
|||||||
@@ -38,6 +38,10 @@ public class JsonObject extends LinkedHashMap<String, Object> implements JsonEle
|
|||||||
return JsonConvert.root().convertFrom(JsonObject.class, text, offset, length);
|
return JsonConvert.root().convertFrom(JsonObject.class, text, offset, length);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public static JsonObject create() {
|
||||||
|
return new JsonObject();
|
||||||
|
}
|
||||||
|
|
||||||
public static JsonObject of(Object bean) {
|
public static JsonObject of(Object bean) {
|
||||||
if (bean instanceof CharSequence) {
|
if (bean instanceof CharSequence) {
|
||||||
return convertFrom(bean.toString());
|
return convertFrom(bean.toString());
|
||||||
|
|||||||
@@ -23,7 +23,7 @@ import org.redkale.convert.ConvertType;
|
|||||||
@Retention(RUNTIME)
|
@Retention(RUNTIME)
|
||||||
public @interface ResourceProducer {
|
public @interface ResourceProducer {
|
||||||
|
|
||||||
String mq();
|
String mq() default "";
|
||||||
|
|
||||||
boolean required() default true;
|
boolean required() default true;
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user