package com.ifpdos.autotest.lancontrol.module.other.f.e;

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

/* JADX INFO: compiled from: GsonUtil.java */
/* JADX INFO: loaded from: classes.dex */
class a implements c {

    /* JADX INFO: renamed from: a, reason: collision with root package name */
    private final Gson f2200a = new GsonBuilder().setLenient().create();

    a() {
    }

    @Override // com.ifpdos.autotest.lancontrol.module.other.f.e.c
    public String a(Object obj) {
        return this.f2200a.toJson(obj);
    }

    @Override // com.ifpdos.autotest.lancontrol.module.other.f.e.c
    public <T> T b(String str, Class<T> cls) {
        try {
            return (T) this.f2200a.fromJson(str, (Class) cls);
        } catch (JsonSyntaxException e2) {
            b.c.d.d.c.b("GsonUtil", e2.getMessage());
            return null;
        }
    }
}
