Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVA

@expose(serialize = false) not working

public static final Gson PRETTY_PRINT_JSON = new GsonBuilder()
        .addSerializationExclusionStrategy(new ExclusionStrategy()
        {
            @Override
            public boolean shouldSkipField(FieldAttributes f)
            {
                return f.getAnnotation(SkipSerialisation.class) != null;
            }

            @Override
            public boolean shouldSkipClass(Class<?> clazz)
            {
                return false;
            }
        })
        .setPrettyPrinting()
        .create();
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #working
ADD COMMENT
Topic
Name
4+3 =