Home »
MCQs »
Jackson MCQs
Which of the following annotations indicates which fields of a Java object, based on their values, should be included or omitted during serialization?
14. Which of the following annotations indicates which fields of a Java object, based on their values, should be included or omitted during serialization?
- @Json
- @JsonInclude
- @Include
- @IncludeJson
Answer: B) @JsonInclude
Explanation:
@JsonInclude annotations indicate which fields of a Java object, based on their values, should be included or omitted during serialization.