Last active
January 20, 2016 09:21
-
-
Save abhirockzz/685f74729863bfde7010 to your computer and use it in GitHub Desktop.
Simple JAX-RS ParamConverter implementation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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