Class FastJsonHelper
-
- All Implemented Interfaces:
public class FastJsonHelperFastJson Util, not recommended for use in complex types Fastjson NOTE * LocalDateTime as "2023-04-05 06:07:08" * ZoneDateTime as "2023-04-05T06:07:08[America/New_York]" * OffsetDateTime as "2023-04-05T06:07:08-04:00"- Since:
2022-04-22
trydofor
-
-
Field Summary
Fields Modifier and Type Field Description public final static Array<JSONReader.Feature>WingsReaderpublic final static Array<JSONWriter.Feature>WingsWriterpublic final static Array<JSONPath.Feature>WingsPathpublic final static longWingsPathMask
-
Constructor Summary
Constructors Constructor Description FastJsonHelper()
-
Method Summary
Modifier and Type Method Description static <T> Tobject(String json, @NotNull() ResolvableType targetType)Deserialization with the wings convention static <T> Tobject(String json, @NotNull() TypeDescriptor targetType)Deserialization with the wings convention static <T> Tobject(String json, @NotNull() Type targetType)Deserialization with the wings convention static <T> Tobject(String json, @NotNull() Class<out Object> targetType, Array<Class<out Object>> generics)Deserialization with the wings convention static JSONObjectobject(String json)Deserialization with the wings convention static <T> Tobject(InputStream json, @NotNull() ResolvableType targetType)Deserialization with the wings convention static <T> Tobject(InputStream json, @NotNull() TypeDescriptor targetType)Deserialization with the wings convention static <T> Tobject(InputStream json, @NotNull() Type targetType)Deserialization with the wings convention static <T> Tobject(InputStream json, @NotNull() Class<out Object> targetType, Array<Class<out Object>> generics)Deserialization with the wings convention static JSONObjectobject(InputStream json)Deserialization with the wings convention static <T> Tobject(Array<byte> json, @NotNull() ResolvableType targetType)Deserialization with the wings convention static <T> Tobject(Array<byte> json, @NotNull() TypeDescriptor targetType)Deserialization with the wings convention static <T> Tobject(Array<byte> json, @NotNull() Type targetType)Deserialization with the wings convention static <T> Tobject(Array<byte> json, @NotNull() Class<out Object> targetType, Array<Class<out Object>> generics)Deserialization with the wings convention static JSONObjectobject(Array<byte> json)Deserialization with the wings convention static Stringstring(Object obj)Serialization using the wings convention, output as string wherever possible to ensure data precision, but not affecting Java type inverse parsing static Array<byte>bytes(Object obj)static Stringstring(Object obj, Array<Filter> filters)Serialization using the wings convention, output as string wherever possible to ensure data precision, but not affecting Java type inverse parsing static Array<byte>bytes(Object obj, Array<Filter> filters)static JSONPathpath(@NotNull() String path)weak cached JsonPath static JSONPathpath(@NotNull() String path, Type type)weak cached JsonPath static JSONPathpath(@NotNull() String path, Class<out Object> type, Array<Class<out Object>> generics)weak cached JsonPath static JSONPathpath(@NotNull() String path, Type type, Array<JSONPath.Feature> features)weak cached JsonPath static JSONPathpath(@NotNull() Array<String> paths, Array<Type> types, Array<JSONPath.Feature> features)cached JsonPath static JSONPathpath(@NotNull() Array<String> paths, Array<Type> types, Array<JSONPath.Feature> pathFeatures, Array<JSONReader.Feature> features)cached JsonPath static Array<long>features(int size, Array<JSONPath.Feature> features)static longfeatureMask(Array<JSONPath.Feature> features)static StringgetString(JSONObject node, String field, String defaults)static booleangetBoolean(JSONObject node, String field, boolean defaults)static intgetInt(JSONObject node, String field, int defaults)static longgetLong(JSONObject node, String field, long defaults)static doublegetDouble(JSONObject node, String field, double defaults)-
-
Method Detail
-
object
@Contract(value = "!null,_->!null") static <T> T object(String json, @NotNull() ResolvableType targetType)
Deserialization with the wings convention
-
object
@Contract(value = "!null,_->!null") static <T> T object(String json, @NotNull() TypeDescriptor targetType)
Deserialization with the wings convention
-
object
@Contract(value = "!null,_->!null") static <T> T object(String json, @NotNull() Type targetType)
Deserialization with the wings convention
-
object
@Contract(value = "!null,_,_->!null") static <T> T object(String json, @NotNull() Class<out Object> targetType, Array<Class<out Object>> generics)
Deserialization with the wings convention
-
object
@Contract(value = "!null->!null") static JSONObject object(String json)
Deserialization with the wings convention
-
object
@Contract(value = "!null,_->!null") static <T> T object(InputStream json, @NotNull() ResolvableType targetType)
Deserialization with the wings convention
-
object
@Contract(value = "!null,_->!null") static <T> T object(InputStream json, @NotNull() TypeDescriptor targetType)
Deserialization with the wings convention
-
object
@Contract(value = "!null,_->!null") static <T> T object(InputStream json, @NotNull() Type targetType)
Deserialization with the wings convention
-
object
@Contract(value = "!null,_,_->!null") static <T> T object(InputStream json, @NotNull() Class<out Object> targetType, Array<Class<out Object>> generics)
Deserialization with the wings convention
-
object
@Contract(value = "!null->!null") static JSONObject object(InputStream json)
Deserialization with the wings convention
-
object
@Contract(value = "!null,_->!null") static <T> T object(Array<byte> json, @NotNull() ResolvableType targetType)
Deserialization with the wings convention
-
object
@Contract(value = "!null,_->!null") static <T> T object(Array<byte> json, @NotNull() TypeDescriptor targetType)
Deserialization with the wings convention
-
object
@Contract(value = "!null,_->!null") static <T> T object(Array<byte> json, @NotNull() Type targetType)
Deserialization with the wings convention
-
object
@Contract(value = "!null,_,_->!null") static <T> T object(Array<byte> json, @NotNull() Class<out Object> targetType, Array<Class<out Object>> generics)
Deserialization with the wings convention
-
object
@Contract(value = "!null->!null") static JSONObject object(Array<byte> json)
Deserialization with the wings convention
-
string
@Contract(value = "!null->!null") static String string(Object obj)
Serialization using the wings convention, output as string wherever possible to ensure data precision, but not affecting Java type inverse parsing
-
string
@Contract(value = "!null,_->!null") static String string(Object obj, Array<Filter> filters)
Serialization using the wings convention, output as string wherever possible to ensure data precision, but not affecting Java type inverse parsing
-
bytes
@Contract(value = "!null,_->!null") static Array<byte> bytes(Object obj, Array<Filter> filters)
-
path
static JSONPath path(@NotNull() String path, Class<out Object> type, Array<Class<out Object>> generics)
weak cached JsonPath
-
path
static JSONPath path(@NotNull() String path, Type type, Array<JSONPath.Feature> features)
weak cached JsonPath
-
path
static JSONPath path(@NotNull() Array<String> paths, Array<Type> types, Array<JSONPath.Feature> features)
cached JsonPath
-
path
static JSONPath path(@NotNull() Array<String> paths, Array<Type> types, Array<JSONPath.Feature> pathFeatures, Array<JSONReader.Feature> features)
cached JsonPath
-
featureMask
static long featureMask(Array<JSONPath.Feature> features)
-
getString
@Contract(value = "_,_,!null->!null") static String getString(JSONObject node, String field, String defaults)
-
getBoolean
static boolean getBoolean(JSONObject node, String field, boolean defaults)
-
-
-
-