// Path: kratos/src/main/java/kratos/internal/KStringDeserializer.java
// public class KStringDeserializer implements JsonDeserializer<KString> {
// 
//     private Class<?> mTargetClass;
// 
//     @Override
//     public KString deserialize(JsonElement json, Type typeOfT, JsonDeserializationContext context) throws JsonParseException {
//         KString field = new KString();
//         field.setInitData(json.getAsString());
//         return field;
//     }
// }


import android.content.Context;
import com.google.gson.ExclusionStrategy;
import com.google.gson.FieldAttributes;
import com.google.gson.Gson;
import com.google.gson.GsonBuilder;
import kratos.internal.KString;
import kratos.internal.KStringDeserializer;
    }

    public static Gson getGson(Context context, Class clazz) {
        GsonBuilder gsonBuilder = new GsonBuilder().addSerializationExclusionStrategy(new ExclusionStrategy() {
            @Override
            public boolean shouldSkipField(FieldAttributes fieldAttributes) {
                return fieldAttributes.getName().endsWith("$delegate")
                        || fieldAttributes.getAnnotation(Skip.class) != null;
            }

            @Override
            public boolean shouldSkipClass(Class<?> aClass) {
                return false;
            }
        }).addDeserializationExclusionStrategy(new ExclusionStrategy() {
            @Override
            public boolean shouldSkipField(FieldAttributes fieldAttributes) {
                return fieldAttributes.getName().endsWith("$delegate")
                        || fieldAttributes.getAnnotation(Skip.class) != null;
            }

            @Override
            public boolean shouldSkipClass(Class<?> aClass) {
                return false;
            }
        });

        if (clazz != null && context != null) {
            gsonBuilder.registerTypeAdapter(clazz, new GsonUtilsCreator(context));
        }
// Path: kratos/src/main/java/kratos/internal/KStringDeserializer.java
// public class KStringDeserializer implements JsonDeserializer<KString> {
// 
//     private Class<?> mTargetClass;
// 
//     @Override
//     public KString deserialize(JsonElement json, Type typeOfT, JsonDeserializationContext context) throws JsonParseException {
//         KString field = new KString();
//         field.setInitData(json.getAsString());
//         return field;
//     }
// }


// Path: kratos/src/main/java/kratos/card/utils/GsonUtils.java
import android.content.Context;
import com.google.gson.ExclusionStrategy;
import com.google.gson.FieldAttributes;
import com.google.gson.Gson;
import com.google.gson.GsonBuilder;
import kratos.internal.KString;
import kratos.internal.KStringDeserializer;

    }

    public static Gson getGson(Context context, Class clazz) {
        GsonBuilder gsonBuilder = new GsonBuilder().addSerializationExclusionStrategy(new ExclusionStrategy() {
            @Override
            public boolean shouldSkipField(FieldAttributes fieldAttributes) {
                return fieldAttributes.getName().endsWith("$delegate")
                        || fieldAttributes.getAnnotation(Skip.class) != null;
            }

            @Override
            public boolean shouldSkipClass(Class<?> aClass) {
                return false;
            }
        }).addDeserializationExclusionStrategy(new ExclusionStrategy() {
            @Override
            public boolean shouldSkipField(FieldAttributes fieldAttributes) {
                return fieldAttributes.getName().endsWith("$delegate")
                        || fieldAttributes.getAnnotation(Skip.class) != null;
            }

            @Override
            public boolean shouldSkipClass(Class<?> aClass) {
                return false;
            }
        });

        if (clazz != null && context != null) {
            gsonBuilder.registerTypeAdapter(clazz, new GsonUtilsCreator(context));
        }
        gsonBuilder.registerTypeAdapter(KString.class, new KStringDeserializer());