I was trying to pass a Boolean value in JSON from Postman and every time it gives me this error: "Invalid JSON input: Unrecognized field “isCancellable” (class com.example.springsecurity.dto.AddProductDTO), not marked as ignorable; nested exception is com.fasterxml.jackson.databind.exc.UnrecognizedPropertyException: Unrecognized field “isCancellable” at [Source: (PushbackInputStream); line: 6, column: 19]
Where this is what I want to input:
{
“isReturnable”: 0
}
I also tried adding ‘false’ instead then it gives me this error: “JSON parse error: Unexpected character (’’’ (code 39)): expected a valid value (JSON String, Number, Array, Object or token ‘null’, ‘true’ or ‘false’); nested exception is com.fasterxml.jackson.core.JsonParseException: Unexpected character (’’’ (code 39)): expected a valid value (JSON String, Number, Array, Object or token ‘null’, ‘true’ or ‘false’)\n at [Source: (PushbackInputStream); line: 6, column: 19]”,
Can anyone help with this?