程序包 cn.zhxu.xjson

类 JsonbKit

java.lang.Object
cn.zhxu.xjson.JsonbKit

public class JsonbKit extends Object
从以下版本开始:
1.4.0 JSONB 工具类,不依赖具体实现
作者:
Troy.Zhou
  • 构造器概要

    构造器
    构造器
    说明
     
  • 方法概要

    修饰符和类型
    方法
    说明
    static cn.zhxu.data.Array
    toArray(byte[] jsonbBytes)
    JSONB 字节数组转换为 Array 对象
    static cn.zhxu.data.Array
    toArray(String jsonbBase64)
    JSONB 的 Base64 字符串转换为 Array 对象
    static String
    toBase64(Object object)
    对象转 JSONB 的 Base64 字符串
    static <T> T
    toBean(cn.zhxu.data.TypeRef<T> typeRef, byte[] jsonbBytes)
    JSONB 字节数组转换为 Bean 对象
    static <T> T
    toBean(cn.zhxu.data.TypeRef<T> typeRef, String jsonbBase64)
    JSONB 的 Base64 字符串转换为 Bean 对象
    static <T> T
    toBean(Type type, byte[] jsonbBytes)
    JSONB 字节数组转换为 Bean 对象
    static <T> T
    toBean(Type type, String jsonbBase64)
    JSONB 的 Base64 字符串转换为 Bean 对象
    static byte[]
    toBytes(Object object)
    对象转 JSONB 字节数组
    static <T> List<T>
    toList(Class<T> type, byte[] jsonbBytes)
    JSONB 字节数组转换为 Bean 对象
    static <T> List<T>
    toList(Class<T> type, String jsonbBase64)
    JSONB 的 Base64 字符串转换为 Bean 对象
    static cn.zhxu.data.Mapper
    toMapper(byte[] jsonbBytes)
    JSONB 字节数组转换为 Mapper 对象
    static cn.zhxu.data.Mapper
    toMapper(String jsonbBase64)
    JSONB 的 Base64 字符串转换为 Mapper 对象

    从类继承的方法 java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • 构造器详细资料

    • JsonbKit

      public JsonbKit()
  • 方法详细资料

    • toMapper

      public static cn.zhxu.data.Mapper toMapper(String jsonbBase64)
      JSONB 的 Base64 字符串转换为 Mapper 对象
      参数:
      jsonbBase64 - JSONB 的 Base64 字符串
      返回:
      Mapper
    • toMapper

      public static cn.zhxu.data.Mapper toMapper(byte[] jsonbBytes)
      JSONB 字节数组转换为 Mapper 对象
      参数:
      jsonbBytes - JSONB 字节数组
      返回:
      Mapper
      从以下版本开始:
      v1.3.0
    • toArray

      public static cn.zhxu.data.Array toArray(String jsonbBase64)
      JSONB 的 Base64 字符串转换为 Array 对象
      参数:
      jsonbBase64 - JSONB 的 Base64 字符串
      返回:
      Array
    • toArray

      public static cn.zhxu.data.Array toArray(byte[] jsonbBytes)
      JSONB 字节数组转换为 Array 对象
      参数:
      jsonbBytes - JSONB 字节数组
      返回:
      Array
      从以下版本开始:
      v1.3.0
    • toBean

      public static <T> T toBean(Type type, String jsonbBase64)
      JSONB 的 Base64 字符串转换为 Bean 对象
      类型参数:
      T - 泛型
      参数:
      type - Bean 类型
      jsonbBase64 - JSONB 的 Base64 字符串
      返回:
      Bean 对象
    • toBean

      public static <T> T toBean(Type type, byte[] jsonbBytes)
      JSONB 字节数组转换为 Bean 对象
      类型参数:
      T - 泛型
      参数:
      type - Bean 类型
      jsonbBytes - JSONB 字节数组
      返回:
      Bean 对象
      从以下版本开始:
      v1.3.0
    • toBean

      public static <T> T toBean(cn.zhxu.data.TypeRef<T> typeRef, String jsonbBase64)
      JSONB 的 Base64 字符串转换为 Bean 对象
      类型参数:
      T - 泛型
      参数:
      typeRef - Bean 类型
      jsonbBase64 - JSONB 的 Base64 字符串
      返回:
      Bean 对象
      从以下版本开始:
      v1.2.0
    • toBean

      public static <T> T toBean(cn.zhxu.data.TypeRef<T> typeRef, byte[] jsonbBytes)
      JSONB 字节数组转换为 Bean 对象
      类型参数:
      T - 泛型
      参数:
      typeRef - Bean 类型
      jsonbBytes - JSONB 字节数组
      返回:
      Bean 对象
      从以下版本开始:
      v1.2.0
    • toList

      public static <T> List<T> toList(Class<T> type, String jsonbBase64)
      JSONB 的 Base64 字符串转换为 Bean 对象
      类型参数:
      T - 泛型
      参数:
      type - Bean 类型
      jsonbBase64 - JSONB 的 Base64 字符串
      返回:
      Bean List
    • toList

      public static <T> List<T> toList(Class<T> type, byte[] jsonbBytes)
      JSONB 字节数组转换为 Bean 对象
      类型参数:
      T - 泛型
      参数:
      type - Bean 类型
      jsonbBytes - JSONB 字节数组
      返回:
      Bean List
      从以下版本开始:
      v1.2.0
    • toBase64

      public static String toBase64(Object object)
      对象转 JSONB 的 Base64 字符串
      参数:
      object - 对象
      返回:
      JSONB 的 Base64 字符串
    • toBytes

      public static byte[] toBytes(Object object)
      对象转 JSONB 字节数组
      参数:
      object - 对象
      返回:
      JSONB 字节数组
      从以下版本开始:
      v1.2.0