接口 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"/>
 

从以下版本开始:
3.5.6
作者:
nieqiurong 2024年3月4日
另请参阅:
  • 自动构建
  • 手动指定
  • 方法概要

    修饰符和类型
    方法
    说明
    parse(String json)
    反序列化json
    toJson(T obj)
    序列化json
  • 方法详细资料

    • parse

      T parse(String json)
      反序列化json
      参数:
      json - json字符串
      返回:
      T
    • toJson

      String toJson(T obj)
      序列化json
      参数:
      obj - 对象信息
      返回:
      json字符串