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