what-the-bank/sources/com/google/android/libraries/places/internal/zzej.java

24 lines
832 B
Java
Raw Normal View History

2024-07-27 18:17:47 +07:00
package com.google.android.libraries.places.internal;
import com.google.gson.FieldNamingPolicy;
import com.google.gson.Gson;
import com.google.gson.GsonBuilder;
import com.google.gson.JsonSyntaxException;
/* loaded from: classes2.dex */
public final class zzej {
private final Gson zza = new GsonBuilder().setFieldNamingPolicy(FieldNamingPolicy.LOWER_CASE_WITH_UNDERSCORES).create();
public final Object zza(String str, Class cls) throws zzdh {
try {
return this.zza.fromJson(str, cls);
} catch (JsonSyntaxException unused) {
String name = cls.getName();
StringBuilder sb = new StringBuilder("Could not convert JSON string to ");
sb.append(name);
sb.append(" due to syntax errors.");
throw new zzdh(sb.toString());
}
}
}