How to pass JSON Object and return Object from Spring rest controller

I have an entity class like below: public class InputData { byte[] nameBytes; InputType inputType; InputType outputType; String inputName; Description desc; } Here is my rest …