Class JsonUtils
java.lang.Object
com.alibaba.dashscope.legacy_2x.utils.JsonUtils
Deprecated.
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic <T> TDeprecated.static <T> TDeprecated.static <T> TDeprecated.static <T> TfromJsonObject(com.google.gson.JsonElement jsonElement, Class<T> clazz) Deprecated.static com.google.gson.JsonObjectmerge(com.google.gson.JsonObject dest, com.google.gson.JsonObject src) Deprecated.static com.google.gson.JsonObjectparametersToJsonObject(Map<String, Object> parameters) Deprecated.static com.google.gson.JsonObjectDeprecated.static com.google.gson.JsonElementparseReader(com.google.gson.stream.JsonReader reader) Deprecated.Returns the next value from the JSON stream as a parse tree.static com.google.gson.JsonElementparseReader(Reader reader) Deprecated.Parses the specified JSON string into a parse treestatic com.google.gson.JsonElementparseString(String json) Deprecated.Parses the specified JSON string into a parse treestatic StringDeprecated.static com.google.gson.JsonArraytoJsonArray(Object obj) Deprecated.static com.google.gson.JsonElementtoJsonElement(Object obj) Deprecated.static com.google.gson.JsonObjecttoJsonObject(Object obj) Deprecated.
-
Field Details
-
gson
public static final com.google.gson.Gson gsonDeprecated.
-
-
Constructor Details
-
JsonUtils
public JsonUtils()Deprecated.
-
-
Method Details
-
toJson
Deprecated. -
fromJson
Deprecated. -
fromJson
Deprecated. -
fromJson
Deprecated. -
fromJsonObject
Deprecated. -
toJsonArray
Deprecated. -
toJsonObject
Deprecated. -
toJsonElement
Deprecated. -
parse
Deprecated. -
parseString
public static com.google.gson.JsonElement parseString(String json) throws com.google.gson.JsonSyntaxException Deprecated.Parses the specified JSON string into a parse tree- Parameters:
json- JSON text- Returns:
- a parse tree of
JsonElements corresponding to the specified JSON - Throws:
com.google.gson.JsonParseException- if the specified text is not valid JSONcom.google.gson.JsonSyntaxException
-
parseReader
public static com.google.gson.JsonElement parseReader(Reader reader) throws com.google.gson.JsonIOException, com.google.gson.JsonSyntaxException Deprecated.Parses the specified JSON string into a parse tree- Parameters:
reader- JSON text- Returns:
- a parse tree of
JsonElements corresponding to the specified JSON - Throws:
com.google.gson.JsonParseException- if the specified text is not valid JSONcom.google.gson.JsonIOExceptioncom.google.gson.JsonSyntaxException
-
parseReader
public static com.google.gson.JsonElement parseReader(com.google.gson.stream.JsonReader reader) throws com.google.gson.JsonIOException, com.google.gson.JsonSyntaxException Deprecated.Returns the next value from the JSON stream as a parse tree.- Parameters:
reader- The json reader.- Returns:
- The `JsonElement` of the reader.
- Throws:
com.google.gson.JsonParseException- if there is an IOException or if the specified text is not valid JSONcom.google.gson.JsonIOExceptioncom.google.gson.JsonSyntaxException
-
merge
public static com.google.gson.JsonObject merge(com.google.gson.JsonObject dest, com.google.gson.JsonObject src) Deprecated. -
parametersToJsonObject
Deprecated.
-