package cactusServer.utils; import javax.ws.rs.ext.ParamConverter; import net.arnx.jsonic.JSON; public class MyParamConverter implements ParamConverter<Object> { private Class<?> type; public MyParamConverter(Class<?> type) { this.type = type; } @Override public Object fromString(String value) { return JSON.decode(value, type); } @Override public String toString(Object obj) { return JSON.encode(obj); } }