Blame view

parking-module-system/src/main/java/com/zteits/wxcp/utils/JsonUtils.java 366 Bytes
55f68655   王彪总   新项目
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
  package com.zteits.wxcp.utils;
  
  import com.google.gson.Gson;
  import com.google.gson.GsonBuilder;
  
  /**
   * @author Binary Wang(https://github.com/binarywang)
   */
  public class JsonUtils {
      public static String toJson(Object obj) {
          Gson gson = new GsonBuilder()
              .setPrettyPrinting()
              .create();
          return gson.toJson(obj);
      }
  }