001package com.thed.util.gson; 002 003 004import com.google.gson.Gson; 005import com.google.gson.GsonBuilder; 006 007import javax.xml.datatype.XMLGregorianCalendar; 008 009public class GsonXcalUtil { 010 011 public static Gson CUSTOM_GSON ; 012 static { 013 014 Gson gson =new GsonBuilder().registerTypeAdapter(XMLGregorianCalendar.class, 015 new XGCalConverter.Serializer()).registerTypeAdapter(XMLGregorianCalendar.class, 016 new XGCalConverter.Deserializer()).create(); 017 CUSTOM_GSON = gson ; 018 } 019 020 021}