1<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> 2<!-- NewPage --> 3<html lang="en"> 4<head> 5<!-- Generated by javadoc (version 1.7.0_79) on Tue Jan 23 20:10:06 PST 2018 --> 6<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"> 7<title>JsonSetter (Jackson-annotations 2.9.0 API)</title> 8<meta name="date" content="2018-01-23"> 9<link rel="stylesheet" type="text/css" href="../../../../stylesheet.css" title="Style"> 10</head> 11<body> 12<script type="text/javascript"><!-- 13 if (location.href.indexOf('is-external=true') == -1) { 14 parent.document.title="JsonSetter (Jackson-annotations 2.9.0 API)"; 15 } 16//--> 17</script> 18<noscript> 19<div>JavaScript is disabled on your browser.</div> 20</noscript> 21<!-- ========= START OF TOP NAVBAR ======= --> 22<div class="topNav"><a name="navbar_top"> 23<!-- --> 24</a><a href="#skip-navbar_top" title="Skip navigation links"></a><a name="navbar_top_firstrow"> 25<!-- --> 26</a> 27<ul class="navList" title="Navigation"> 28<li><a href="../../../../com/fasterxml/jackson/annotation/package-summary.html">Package</a></li> 29<li class="navBarCell1Rev">Class</li> 30<li><a href="class-use/JsonSetter.html">Use</a></li> 31<li><a href="package-tree.html">Tree</a></li> 32<li><a href="../../../../deprecated-list.html">Deprecated</a></li> 33<li><a href="../../../../index-all.html">Index</a></li> 34<li><a href="../../../../help-doc.html">Help</a></li> 35</ul> 36</div> 37<div class="subNav"> 38<ul class="navList"> 39<li><a href="../../../../com/fasterxml/jackson/annotation/JsonRootName.html" title="annotation in com.fasterxml.jackson.annotation"><span class="strong">Prev Class</span></a></li> 40<li><a href="../../../../com/fasterxml/jackson/annotation/JsonSetter.Value.html" title="class in com.fasterxml.jackson.annotation"><span class="strong">Next Class</span></a></li> 41</ul> 42<ul class="navList"> 43<li><a href="../../../../index.html?com/fasterxml/jackson/annotation/JsonSetter.html" target="_top">Frames</a></li> 44<li><a href="JsonSetter.html" target="_top">No Frames</a></li> 45</ul> 46<ul class="navList" id="allclasses_navbar_top"> 47<li><a href="../../../../allclasses-noframe.html">All Classes</a></li> 48</ul> 49<div> 50<script type="text/javascript"><!-- 51 allClassesLink = document.getElementById("allclasses_navbar_top"); 52 if(window==top) { 53 allClassesLink.style.display = "block"; 54 } 55 else { 56 allClassesLink.style.display = "none"; 57 } 58 //--> 59</script> 60</div> 61<div> 62<ul class="subNavList"> 63<li>Summary: </li> 64<li>Required | </li> 65<li><a href="#annotation_type_optional_element_summary">Optional</a></li> 66</ul> 67<ul class="subNavList"> 68<li>Detail: </li> 69<li><a href="#annotation_type_element_detail">Element</a></li> 70</ul> 71</div> 72<a name="skip-navbar_top"> 73<!-- --> 74</a></div> 75<!-- ========= END OF TOP NAVBAR ========= --> 76<!-- ======== START OF CLASS DATA ======== --> 77<div class="header"> 78<div class="subTitle">com.fasterxml.jackson.annotation</div> 79<h2 title="Annotation Type JsonSetter" class="title">Annotation Type JsonSetter</h2> 80</div> 81<div class="contentContainer"> 82<div class="description"> 83<ul class="blockList"> 84<li class="blockList"> 85<hr> 86<br> 87<pre><a href="http://docs.oracle.com/javase/6/docs/api/java/lang/annotation/Target.html?is-external=true" title="class or interface in java.lang.annotation">@Target</a>(<a href="http://docs.oracle.com/javase/6/docs/api/java/lang/annotation/Target.html?is-external=true#value()" title="class or interface in java.lang.annotation">value</a>={<a href="http://docs.oracle.com/javase/6/docs/api/java/lang/annotation/ElementType.html?is-external=true#ANNOTATION_TYPE" title="class or interface in java.lang.annotation">ANNOTATION_TYPE</a>,<a href="http://docs.oracle.com/javase/6/docs/api/java/lang/annotation/ElementType.html?is-external=true#FIELD" title="class or interface in java.lang.annotation">FIELD</a>,<a href="http://docs.oracle.com/javase/6/docs/api/java/lang/annotation/ElementType.html?is-external=true#METHOD" title="class or interface in java.lang.annotation">METHOD</a>,<a href="http://docs.oracle.com/javase/6/docs/api/java/lang/annotation/ElementType.html?is-external=true#PARAMETER" title="class or interface in java.lang.annotation">PARAMETER</a>}) 88<a href="http://docs.oracle.com/javase/6/docs/api/java/lang/annotation/Retention.html?is-external=true" title="class or interface in java.lang.annotation">@Retention</a>(<a href="http://docs.oracle.com/javase/6/docs/api/java/lang/annotation/Retention.html?is-external=true#value()" title="class or interface in java.lang.annotation">value</a>=<a href="http://docs.oracle.com/javase/6/docs/api/java/lang/annotation/RetentionPolicy.html?is-external=true#RUNTIME" title="class or interface in java.lang.annotation">RUNTIME</a>) 89public @interface <span class="strong">JsonSetter</span></pre> 90<div class="block">Annotation that can be used to define a non-static, 91 single-argument method to be used as a "setter" for a logical property 92 as an alternative to recommended 93 <a href="../../../../com/fasterxml/jackson/annotation/JsonProperty.html" title="annotation in com.fasterxml.jackson.annotation"><code>JsonProperty</code></a> annotation; 94 or (as of 2.9 and later), specify additional aspects of the 95 assigning property a value during serialization.</div> 96</li> 97</ul> 98</div> 99<div class="summary"> 100<ul class="blockList"> 101<li class="blockList"> 102<!-- =========== ANNOTATION TYPE OPTIONAL MEMBER SUMMARY =========== --> 103<ul class="blockList"> 104<li class="blockList"><a name="annotation_type_optional_element_summary"> 105<!-- --> 106</a> 107<h3>Optional Element Summary</h3> 108<table class="overviewSummary" border="0" cellpadding="3" cellspacing="0" summary="Optional Element Summary table, listing optional elements, and an explanation"> 109<caption><span>Optional Elements</span><span class="tabEnd"> </span></caption> 110<tr> 111<th class="colFirst" scope="col">Modifier and Type</th> 112<th class="colLast" scope="col">Optional Element and Description</th> 113</tr> 114<tr class="altColor"> 115<td class="colFirst"><code><a href="../../../../com/fasterxml/jackson/annotation/Nulls.html" title="enum in com.fasterxml.jackson.annotation">Nulls</a></code></td> 116<td class="colLast"><code><strong><a href="../../../../com/fasterxml/jackson/annotation/JsonSetter.html#contentNulls()">contentNulls</a></strong></code> 117<div class="block">Specifies action to take when input to match into content value 118 (of a <a href="http://docs.oracle.com/javase/6/docs/api/java/util/Collection.html?is-external=true" title="class or interface in java.util"><code>Collection</code></a>, <a href="http://docs.oracle.com/javase/6/docs/api/java/util/Map.html?is-external=true" title="class or interface in java.util"><code>Map</code></a>, array, 119 or referential value) contains explicit `null` value 120 (if format has one) to bind.</div> 121</td> 122</tr> 123<tr class="rowColor"> 124<td class="colFirst"><code><a href="../../../../com/fasterxml/jackson/annotation/Nulls.html" title="enum in com.fasterxml.jackson.annotation">Nulls</a></code></td> 125<td class="colLast"><code><strong><a href="../../../../com/fasterxml/jackson/annotation/JsonSetter.html#nulls()">nulls</a></strong></code> 126<div class="block">Specifies action to take when input contains explicit `null` value 127 (if format has one).</div> 128</td> 129</tr> 130<tr class="altColor"> 131<td class="colFirst"><code><a href="http://docs.oracle.com/javase/6/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a></code></td> 132<td class="colLast"><code><strong><a href="../../../../com/fasterxml/jackson/annotation/JsonSetter.html#value()">value</a></strong></code> 133<div class="block">Optional default argument that defines logical property this 134 method is used to modify ("set"); this is the property 135 name used in JSON content.</div> 136</td> 137</tr> 138</table> 139</li> 140</ul> 141</li> 142</ul> 143</div> 144<div class="details"> 145<ul class="blockList"> 146<li class="blockList"> 147<!-- ============ ANNOTATION TYPE MEMBER DETAIL =========== --> 148<ul class="blockList"> 149<li class="blockList"><a name="annotation_type_element_detail"> 150<!-- --> 151</a> 152<h3>Element Detail</h3> 153<a name="value()"> 154<!-- --> 155</a> 156<ul class="blockList"> 157<li class="blockList"> 158<h4>value</h4> 159<pre>public abstract <a href="http://docs.oracle.com/javase/6/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a> value</pre> 160<div class="block">Optional default argument that defines logical property this 161 method is used to modify ("set"); this is the property 162 name used in JSON content.</div> 163<dl> 164<dt>Default:</dt> 165<dd>""</dd> 166</dl> 167</li> 168</ul> 169<a name="nulls()"> 170<!-- --> 171</a> 172<ul class="blockList"> 173<li class="blockList"> 174<h4>nulls</h4> 175<pre>public abstract <a href="../../../../com/fasterxml/jackson/annotation/Nulls.html" title="enum in com.fasterxml.jackson.annotation">Nulls</a> nulls</pre> 176<div class="block">Specifies action to take when input contains explicit `null` value 177 (if format has one). 178 Default action, in absence of any explicit configuration, 179 is usually <a href="../../../../com/fasterxml/jackson/annotation/Nulls.html#SET"><code>Nulls.SET</code></a>, meaning that the `null` is set as 180 value using setter. 181<p> 182 NOTE: is not usually used in case property value is missing, unless 183 data format specifies that there is defaulting which would result 184 in an explicit null assignment.</div> 185<dl> 186<dt>Default:</dt> 187<dd>com.fasterxml.jackson.annotation.Nulls.DEFAULT</dd> 188</dl> 189</li> 190</ul> 191<a name="contentNulls()"> 192<!-- --> 193</a> 194<ul class="blockListLast"> 195<li class="blockList"> 196<h4>contentNulls</h4> 197<pre>public abstract <a href="../../../../com/fasterxml/jackson/annotation/Nulls.html" title="enum in com.fasterxml.jackson.annotation">Nulls</a> contentNulls</pre> 198<div class="block">Specifies action to take when input to match into content value 199 (of a <a href="http://docs.oracle.com/javase/6/docs/api/java/util/Collection.html?is-external=true" title="class or interface in java.util"><code>Collection</code></a>, <a href="http://docs.oracle.com/javase/6/docs/api/java/util/Map.html?is-external=true" title="class or interface in java.util"><code>Map</code></a>, array, 200 or referential value) contains explicit `null` value 201 (if format has one) to bind. 202 Default action, in absence of any explicit configuration, 203 is usually <a href="../../../../com/fasterxml/jackson/annotation/Nulls.html#SET"><code>Nulls.SET</code></a>, meaning that the `null` is included as usual.</div> 204<dl> 205<dt>Default:</dt> 206<dd>com.fasterxml.jackson.annotation.Nulls.DEFAULT</dd> 207</dl> 208</li> 209</ul> 210</li> 211</ul> 212</li> 213</ul> 214</div> 215</div> 216<!-- ========= END OF CLASS DATA ========= --> 217<!-- ======= START OF BOTTOM NAVBAR ====== --> 218<div class="bottomNav"><a name="navbar_bottom"> 219<!-- --> 220</a><a href="#skip-navbar_bottom" title="Skip navigation links"></a><a name="navbar_bottom_firstrow"> 221<!-- --> 222</a> 223<ul class="navList" title="Navigation"> 224<li><a href="../../../../com/fasterxml/jackson/annotation/package-summary.html">Package</a></li> 225<li class="navBarCell1Rev">Class</li> 226<li><a href="class-use/JsonSetter.html">Use</a></li> 227<li><a href="package-tree.html">Tree</a></li> 228<li><a href="../../../../deprecated-list.html">Deprecated</a></li> 229<li><a href="../../../../index-all.html">Index</a></li> 230<li><a href="../../../../help-doc.html">Help</a></li> 231</ul> 232</div> 233<div class="subNav"> 234<ul class="navList"> 235<li><a href="../../../../com/fasterxml/jackson/annotation/JsonRootName.html" title="annotation in com.fasterxml.jackson.annotation"><span class="strong">Prev Class</span></a></li> 236<li><a href="../../../../com/fasterxml/jackson/annotation/JsonSetter.Value.html" title="class in com.fasterxml.jackson.annotation"><span class="strong">Next Class</span></a></li> 237</ul> 238<ul class="navList"> 239<li><a href="../../../../index.html?com/fasterxml/jackson/annotation/JsonSetter.html" target="_top">Frames</a></li> 240<li><a href="JsonSetter.html" target="_top">No Frames</a></li> 241</ul> 242<ul class="navList" id="allclasses_navbar_bottom"> 243<li><a href="../../../../allclasses-noframe.html">All Classes</a></li> 244</ul> 245<div> 246<script type="text/javascript"><!-- 247 allClassesLink = document.getElementById("allclasses_navbar_bottom"); 248 if(window==top) { 249 allClassesLink.style.display = "block"; 250 } 251 else { 252 allClassesLink.style.display = "none"; 253 } 254 //--> 255</script> 256</div> 257<div> 258<ul class="subNavList"> 259<li>Summary: </li> 260<li>Required | </li> 261<li><a href="#annotation_type_optional_element_summary">Optional</a></li> 262</ul> 263<ul class="subNavList"> 264<li>Detail: </li> 265<li><a href="#annotation_type_element_detail">Element</a></li> 266</ul> 267</div> 268<a name="skip-navbar_bottom"> 269<!-- --> 270</a></div> 271<!-- ======== END OF BOTTOM NAVBAR ======= --> 272<p class="legalCopy"><small>Copyright © 2008–2018 <a href="http://fasterxml.com/">FasterXML</a>. All rights reserved.</small></p> 273</body> 274</html> 275