Skip to content

Instantly share code, notes, and snippets.

@nickname55
Created January 29, 2018 11:05
Show Gist options
  • Save nickname55/568ea63dc2c677864de7d3102fea0405 to your computer and use it in GitHub Desktop.
Save nickname55/568ea63dc2c677864de7d3102fea0405 to your computer and use it in GitHub Desktop.
example gson exculsion strategy
package com.pampushko.confluence.rest;
import com.google.gson.ExclusionStrategy;
import com.google.gson.FieldAttributes;
import lombok.extern.slf4j.Slf4j;
/**
*
*/
@Slf4j
public class MyExclusionStrategy implements ExclusionStrategy
{
@Override
public boolean shouldSkipField(FieldAttributes fieldAttributes)
{
return false;
}
@Override
public boolean shouldSkipClass(Class<?> aClass)
{
return false;
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment