package com.zxhl.cms.utils;

import com.google.gson.Gson;
import com.google.gson.GsonBuilder;

/**
 * Created by Nirui on 17/2/21.
 */

public class GsonInstance {

    private static Gson sInstance;

    public static Gson getInstance() {
        if (sInstance != null) {
            return sInstance;
        }
        synchronized (GsonInstance.class) {
            if (sInstance == null) {
                sInstance = new GsonBuilder().disableHtmlEscaping().serializeNulls().create();
            }
        }
        return sInstance;
    }

}
