skip to Main Content

Json – Jackson using deduction-base deserialization when fields are missing

I am using Jackson to de-serialize this class import com.fasterxml.jackson.annotation.JsonSubTypes; import com.fasterxml.jackson.annotation.JsonTypeInfo; @JsonTypeInfo(use = JsonTypeInfo.Id.DEDUCTION) @JsonSubTypes({ @JsonSubTypes.Type(value = DatiSocieta.class, name = "datiSocieta"), @JsonSubTypes.Type(value = DatiPersonaFisica.class, name = "datiPersonaFisica") , @JsonSubTypes.Type(value = DatiDittaIndividuale.class, name = "datiDittaIndividuale") } ) public interface Dati…

VIEW QUESTION

Can I do without aggressive escaping when executing my curls with JSON payload?

I'm not comfortable with this heavy escaping in my curls curl -X POST -H "Content-Type:application/json" -d "{"username":"john","password":"12345"}" http://localhost:8100/signup I read this answer. Single quotes are not accepted curl -X POST -H "Content-Type:application/json" -d '{"username":"john","password":"12345"}' http://localhost:8100/signup org.springframework.core.codec.DecodingException: JSON decoding error: Unexpected…

VIEW QUESTION
Back To Top
Search