package com.mojang.realmsclient.dto;

import com.google.gson.Gson;

public class GuardedSerializer {
    private final Gson gson;
    
    public GuardedSerializer() {
        this.gson = new Gson();
    }
    
    public String toJson(final ReflectionBasedSerialization dix) {
        return this.gson.toJson(dix);
    }
    
    public <T extends ReflectionBasedSerialization> T fromJson(final String string, final Class<T> class2) {
        return this.gson.<T>fromJson(string, class2);
    }
}
