Class FastJsonHelper
-
- All Implemented Interfaces:
public class FastJsonHelperFastJson Util, not recommended for use in complex types.
- Since:
2022-04-22
trydofor
-
-
Constructor Summary
Constructors Constructor Description FastJsonHelper()
-
Method Summary
Modifier and Type Method Description static voidinitGlobal(boolean init)init or remove the global default setting voidenableFeature(@NotNull() JSONReader.Feature f, boolean enable)enable/disable the Feature static Array<JSONReader.Feature>DefaultReader()voidenableFeature(@NotNull() JSONWriter.Feature f, boolean enable)enable/disable the Feature static Array<JSONWriter.Feature>DefaultWriter()static voidenableFilter(@NotNull() String name, @Nullable() Filter filter)enable/disable the Filter by name, sort by adding order static Array<Filter>DefaultFilter()static <T> Tobject(@Nullable() String json, @NotNull() ResolvableType targetType)Deserialization with the wings convention static <T> Tobject(@Nullable() String json, @NotNull() TypeDescriptor targetType)Deserialization with the wings convention static <T> Tobject(@Nullable() String json, @NotNull() TypeReference<T> targetType)Deserialization with the wings convention static <T> Tobject(@Nullable() String json, @NotNull() Type targetType)Deserialization with the wings convention static <T> Tobject(@Nullable() String json, @NotNull() Class<T> targetType)Deserialization with the wings convention static Stringstring(@Nullable() Object obj)Serialization using the wings convention, output as string wherever possible to ensure data precision, but not affecting Java type inverse parsing -
-
Method Detail
-
initGlobal
static void initGlobal(boolean init)
init or remove the global default setting
-
enableFeature
void enableFeature(@NotNull() JSONReader.Feature f, boolean enable)
enable/disable the Feature
-
DefaultReader
@NotNull() static Array<JSONReader.Feature> DefaultReader()
-
enableFeature
void enableFeature(@NotNull() JSONWriter.Feature f, boolean enable)
enable/disable the Feature
-
DefaultWriter
@NotNull() static Array<JSONWriter.Feature> DefaultWriter()
-
enableFilter
static void enableFilter(@NotNull() String name, @Nullable() Filter filter)
enable/disable the Filter by name, sort by adding order
- Parameters:
name- filter namefilter- `null` to disable, otherwise to enable
-
DefaultFilter
@NotNull() static Array<Filter> DefaultFilter()
-
object
@Contract(value = "!null,_->!null") static <T> T object(@Nullable() String json, @NotNull() ResolvableType targetType)
Deserialization with the wings convention
-
object
@Contract(value = "!null,_->!null") static <T> T object(@Nullable() String json, @NotNull() TypeDescriptor targetType)
Deserialization with the wings convention
-
object
@Contract(value = "!null,_->!null") static <T> T object(@Nullable() String json, @NotNull() TypeReference<T> targetType)
Deserialization with the wings convention
-
object
@Contract(value = "!null,_->!null") static <T> T object(@Nullable() String json, @NotNull() Type targetType)
Deserialization with the wings convention
-
object
@Contract(value = "!null,_->!null") static <T> T object(@Nullable() String json, @NotNull() Class<T> targetType)
Deserialization with the wings convention
-
-
-
-