[英]Understanding of deserialisation of Jackson (fasterxml)
How does Jackson deserialisation work when creating a Java object from JSON?
A common conception is that it first calls the No Argument Constructor and then proceeds to call setters.
一个常见的概念是,它首先调用No Argument构造函数,然后继续调用setter。
But , 但是 ,
Simply put, Jackson first calls a constructor to instantiate an object and then proceeds to call setters on remaining fields.
简而言之,Jackson首先调用构造函数以实例化对象,然后继续在其余字段上调用setter。
Now, how does it decide which constructor to call and what are the remaining fields? 现在,如何确定要调用哪个构造函数以及剩余的字段是什么?
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.