Class JsonConversion
-
- All Implemented Interfaces:
-
org.springframework.core.convert.ConversionService
public class JsonConversion implements ConversionServiceThe underlying implementation is FastJson, which is limited to simple types of trusted services, and may have security issues in non-trusted domains. For complex types with generalizations, fastjson parses them correctly, in addition to paying more attention to the precision of number in js.
- Since:
2022-03-09
trydofor
-
-
Constructor Summary
Constructors Constructor Description JsonConversion()
-
Method Summary
Modifier and Type Method Description booleancanConvert(Class<out Object> sourceType, @NotNull() Class<out Object> targetType)booleancanConvert(TypeDescriptor sourceType, @NotNull() TypeDescriptor targetType)<T> Tconvert(Object source, @NotNull() Class<T> targetType)Objectconvert(Object source, TypeDescriptor sourceType, @NotNull() TypeDescriptor targetType)-
-
Method Detail
-
canConvert
boolean canConvert(Class<out Object> sourceType, @NotNull() Class<out Object> targetType)
-
canConvert
boolean canConvert(TypeDescriptor sourceType, @NotNull() TypeDescriptor targetType)
-
-
-
-