Class JsonConversion

  • All Implemented Interfaces:
    org.springframework.core.convert.ConversionService

    
    public class JsonConversion
     implements ConversionService
                        

    The 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

    Author:

    trydofor

    • Nested Class Summary

      Nested Classes 
      Modifier and Type Class Description
    • Field Summary

      Fields 
      Modifier and Type Field Description
    • Constructor Summary

      Constructors 
      Constructor Description
      JsonConversion()
    • Enum Constant Summary

      Enum Constants 
      Enum Constant Description
    • Method Summary

      Modifier and Type Method Description
      boolean canConvert(Class<out Object> sourceType, @NotNull() Class<out Object> targetType)
      boolean canConvert(TypeDescriptor sourceType, @NotNull() TypeDescriptor targetType)
      <T> T convert(Object source, @NotNull() Class<T> targetType)
      Object convert(Object source, TypeDescriptor sourceType, @NotNull() TypeDescriptor targetType)
      • Methods inherited from class org.springframework.core.convert.ConversionService

        convert
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • JsonConversion

        JsonConversion()