So there is an external issue which is a mismatch in models, effectively 1 model has a field mapped to Boolean and another has the same field mapped to boolean.
We have the JsonB model with the primitive boolean, reading json that has a value of NULL and this fails.
Conceptually this is an issue that should be solved as ... "fix the models so that they align".
An alternative view/question is ... should primitive boolean handling reading NULL? So it's null safe on reading but doesn't have to be null safe on writing?
I'm pondering this case, I don't know if JsonB should change by:
- Improving the parsing error reported for this case (it's ok'ish decent at the moment)
- Actually allowing null on reading primitive boolean (treat it as false, the default value)