Interface IJsonTypeHandler<T>


public interface IJsonTypeHandler<T>
Json类型处理器接口(实现类确保为多例状态).

注意:查询返回时需要使用resultMap

 Example:
     <result property="xx" column="xx" javaType="list" typeHandler="com.baomidou.mybatisplus.extension.handlers.GsonTypeHandler"/>
     <result property="xx" column="xx" typeHandler="com.baomidou.mybatisplus.extension.handlers.GsonTypeHandler"/>
 

Since:
3.5.6
Author:
nieqiurong 2024年3月4日
See Also:
  • 自动构建
  • 手动指定
  • Method Summary

    Modifier and Type
    Method
    Description
    parse(String json)
    反序列化json
    toJson(T obj)
    序列化json
  • Method Details

    • parse

      T parse(String json)
      反序列化json
      Parameters:
      json - json字符串
      Returns:
      T
    • toJson

      String toJson(T obj)
      序列化json
      Parameters:
      obj - 对象信息
      Returns:
      json字符串