Skip to content

Instantly share code, notes, and snippets.

@abhirockzz
Last active January 20, 2016 09:21
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save abhirockzz/685f74729863bfde7010 to your computer and use it in GitHub Desktop.
Save abhirockzz/685f74729863bfde7010 to your computer and use it in GitHub Desktop.
Simple JAX-RS ParamConverter implementation
public class MyParamConverter implements ParamConverter<MyObject>{
@Override
public MyObject fromString(String s){
//imagine MyObject is a third party class
return MyObjectFactory.get(s);
}
@Override
public String toString(MyObject mo){
return mo.toString();
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment