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_10-ea) on Sun Jul 14 20:03:26 PDT 2013 --> 6<title>JsonSerializable (Jackson JSON Processor)</title> 7<meta name="date" content="2013-07-14"> 8<link rel="stylesheet" type="text/css" href="../../../../stylesheet.css" title="Style"> 9</head> 10<body> 11<script type="text/javascript"><!-- 12 if (location.href.indexOf('is-external=true') == -1) { 13 parent.document.title="JsonSerializable (Jackson JSON Processor)"; 14 } 15//--> 16</script> 17<noscript> 18<div>JavaScript is disabled on your browser.</div> 19</noscript> 20<!-- ========= START OF TOP NAVBAR ======= --> 21<div class="topNav"><a name="navbar_top"> 22<!-- --> 23</a><a href="#skip-navbar_top" title="Skip navigation links"></a><a name="navbar_top_firstrow"> 24<!-- --> 25</a> 26<ul class="navList" title="Navigation"> 27<li><a href="../../../../overview-summary.html">Overview</a></li> 28<li><a href="package-summary.html">Package</a></li> 29<li class="navBarCell1Rev">Class</li> 30<li><a href="class-use/JsonSerializable.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="../../../../org/codehaus/jackson/map/JsonMappingException.Reference.html" title="class in org.codehaus.jackson.map"><span class="strong">Prev Class</span></a></li> 40<li><a href="../../../../org/codehaus/jackson/map/JsonSerializableWithType.html" title="interface in org.codehaus.jackson.map"><span class="strong">Next Class</span></a></li> 41</ul> 42<ul class="navList"> 43<li><a href="../../../../index.html?org/codehaus/jackson/map/JsonSerializable.html" target="_top">Frames</a></li> 44<li><a href="JsonSerializable.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>Nested | </li> 65<li>Field | </li> 66<li>Constr | </li> 67<li><a href="#method_summary">Method</a></li> 68</ul> 69<ul class="subNavList"> 70<li>Detail: </li> 71<li>Field | </li> 72<li>Constr | </li> 73<li><a href="#method_detail">Method</a></li> 74</ul> 75</div> 76<a name="skip-navbar_top"> 77<!-- --> 78</a></div> 79<!-- ========= END OF TOP NAVBAR ========= --> 80<!-- ======== START OF CLASS DATA ======== --> 81<div class="header"> 82<div class="subTitle">org.codehaus.jackson.map</div> 83<h2 title="Interface JsonSerializable" class="title">Interface JsonSerializable</h2> 84</div> 85<div class="contentContainer"> 86<div class="description"> 87<ul class="blockList"> 88<li class="blockList"> 89<dl> 90<dt>All Known Subinterfaces:</dt> 91<dd><a href="../../../../org/codehaus/jackson/map/JsonSerializableWithType.html" title="interface in org.codehaus.jackson.map">JsonSerializableWithType</a></dd> 92</dl> 93<dl> 94<dt>All Known Implementing Classes:</dt> 95<dd><a href="../../../../org/codehaus/jackson/node/ArrayNode.html" title="class in org.codehaus.jackson.node">ArrayNode</a>, <a href="../../../../org/codehaus/jackson/map/type/ArrayType.html" title="class in org.codehaus.jackson.map.type">ArrayType</a>, <a href="../../../../org/codehaus/jackson/node/BaseJsonNode.html" title="class in org.codehaus.jackson.node">BaseJsonNode</a>, <a href="../../../../org/codehaus/jackson/node/BigIntegerNode.html" title="class in org.codehaus.jackson.node">BigIntegerNode</a>, <a href="../../../../org/codehaus/jackson/node/BinaryNode.html" title="class in org.codehaus.jackson.node">BinaryNode</a>, <a href="../../../../org/codehaus/jackson/node/BooleanNode.html" title="class in org.codehaus.jackson.node">BooleanNode</a>, <a href="../../../../org/codehaus/jackson/map/type/CollectionLikeType.html" title="class in org.codehaus.jackson.map.type">CollectionLikeType</a>, <a href="../../../../org/codehaus/jackson/map/type/CollectionType.html" title="class in org.codehaus.jackson.map.type">CollectionType</a>, <a href="../../../../org/codehaus/jackson/node/ContainerNode.html" title="class in org.codehaus.jackson.node">ContainerNode</a>, <a href="../../../../org/codehaus/jackson/node/DecimalNode.html" title="class in org.codehaus.jackson.node">DecimalNode</a>, <a href="../../../../org/codehaus/jackson/node/DoubleNode.html" title="class in org.codehaus.jackson.node">DoubleNode</a>, <a href="../../../../org/codehaus/jackson/node/IntNode.html" title="class in org.codehaus.jackson.node">IntNode</a>, <a href="../../../../org/codehaus/jackson/map/util/JSONPObject.html" title="class in org.codehaus.jackson.map.util">JSONPObject</a>, <a href="../../../../org/codehaus/jackson/map/util/JSONWrappedObject.html" title="class in org.codehaus.jackson.map.util">JSONWrappedObject</a>, <a href="../../../../org/codehaus/jackson/node/LongNode.html" title="class in org.codehaus.jackson.node">LongNode</a>, <a href="../../../../org/codehaus/jackson/map/type/MapLikeType.html" title="class in org.codehaus.jackson.map.type">MapLikeType</a>, <a href="../../../../org/codehaus/jackson/map/type/MapType.html" title="class in org.codehaus.jackson.map.type">MapType</a>, <a href="../../../../org/codehaus/jackson/node/MissingNode.html" title="class in org.codehaus.jackson.node">MissingNode</a>, <a href="../../../../org/codehaus/jackson/node/NullNode.html" title="class in org.codehaus.jackson.node">NullNode</a>, <a href="../../../../org/codehaus/jackson/node/NumericNode.html" title="class in org.codehaus.jackson.node">NumericNode</a>, <a href="../../../../org/codehaus/jackson/node/ObjectNode.html" title="class in org.codehaus.jackson.node">ObjectNode</a>, <a href="../../../../org/codehaus/jackson/node/POJONode.html" title="class in org.codehaus.jackson.node">POJONode</a>, <a href="../../../../org/codehaus/jackson/map/type/SimpleType.html" title="class in org.codehaus.jackson.map.type">SimpleType</a>, <a href="../../../../org/codehaus/jackson/node/TextNode.html" title="class in org.codehaus.jackson.node">TextNode</a>, <a href="../../../../org/codehaus/jackson/map/type/TypeBase.html" title="class in org.codehaus.jackson.map.type">TypeBase</a>, <a href="../../../../org/codehaus/jackson/node/ValueNode.html" title="class in org.codehaus.jackson.node">ValueNode</a></dd> 96</dl> 97<hr> 98<div class="block"><strong>Deprecated.</strong></div> 99<br> 100<pre><a href="http://docs.oracle.com/javase/6/docs/api/java/lang/Deprecated.html?is-external=true" title="class or interface in java.lang">@Deprecated</a> 101public interface <span class="strong">JsonSerializable</span></pre> 102<div class="block">Interface that can be implemented by objects that know how to 103 serialize themselves to JSON, using <a href="../../../../org/codehaus/jackson/JsonGenerator.html" title="class in org.codehaus.jackson"><code>JsonGenerator</code></a> 104 (and <a href="../../../../org/codehaus/jackson/map/SerializerProvider.html" title="class in org.codehaus.jackson.map"><code>SerializerProvider</code></a> if necessary). 105<p> 106 Note that implementing this interface binds implementing object 107 closely to Jackson API, and that it is often not necessary to do 108 so -- if class is a bean, it can be serialized without 109 implementing this interface. 110<p> 111 NOTE: as of version 1.5, this interface is missing one crucial 112 aspect, that of dealing with type information embedding. 113 Because of this, this interface is deprecated, although will be 114 fully supported for all 1.x releases, and will work except for 115 cases where polymorphic type information handling is needed for 116 type (in which case implementing if <a href="../../../../org/codehaus/jackson/map/JsonSerializableWithType.html" title="interface in org.codehaus.jackson.map"><code>JsonSerializableWithType</code></a> is crucial).</div> 117<dl><dt><span class="strong">Since:</span></dt> 118 <dd>1.5</dd> 119<dt><span class="strong">See Also:</span></dt><dd><a href="../../../../org/codehaus/jackson/map/JsonSerializableWithType.html" title="interface in org.codehaus.jackson.map"><code>JsonSerializableWithType</code></a></dd></dl> 120</li> 121</ul> 122</div> 123<div class="summary"> 124<ul class="blockList"> 125<li class="blockList"> 126<!-- ========== METHOD SUMMARY =========== --> 127<ul class="blockList"> 128<li class="blockList"><a name="method_summary"> 129<!-- --> 130</a> 131<h3>Method Summary</h3> 132<table class="overviewSummary" border="0" cellpadding="3" cellspacing="0" summary="Method Summary table, listing methods, and an explanation"> 133<caption><span>Methods</span><span class="tabEnd"> </span></caption> 134<tr> 135<th class="colFirst" scope="col">Modifier and Type</th> 136<th class="colLast" scope="col">Method and Description</th> 137</tr> 138<tr class="altColor"> 139<td class="colFirst"><code>void</code></td> 140<td class="colLast"><code><strong><a href="../../../../org/codehaus/jackson/map/JsonSerializable.html#serialize(org.codehaus.jackson.JsonGenerator, org.codehaus.jackson.map.SerializerProvider)">serialize</a></strong>(<a href="../../../../org/codehaus/jackson/JsonGenerator.html" title="class in org.codehaus.jackson">JsonGenerator</a> jgen, 141 <a href="../../../../org/codehaus/jackson/map/SerializerProvider.html" title="class in org.codehaus.jackson.map">SerializerProvider</a> provider)</code> 142<div class="block"><strong>Deprecated.</strong> </div> 143 </td> 144</tr> 145</table> 146</li> 147</ul> 148</li> 149</ul> 150</div> 151<div class="details"> 152<ul class="blockList"> 153<li class="blockList"> 154<!-- ============ METHOD DETAIL ========== --> 155<ul class="blockList"> 156<li class="blockList"><a name="method_detail"> 157<!-- --> 158</a> 159<h3>Method Detail</h3> 160<a name="serialize(org.codehaus.jackson.JsonGenerator, org.codehaus.jackson.map.SerializerProvider)"> 161<!-- --> 162</a> 163<ul class="blockListLast"> 164<li class="blockList"> 165<h4>serialize</h4> 166<pre>void serialize(<a href="../../../../org/codehaus/jackson/JsonGenerator.html" title="class in org.codehaus.jackson">JsonGenerator</a> jgen, 167 <a href="../../../../org/codehaus/jackson/map/SerializerProvider.html" title="class in org.codehaus.jackson.map">SerializerProvider</a> provider) 168 throws <a href="http://docs.oracle.com/javase/6/docs/api/java/io/IOException.html?is-external=true" title="class or interface in java.io">IOException</a>, 169 <a href="../../../../org/codehaus/jackson/JsonProcessingException.html" title="class in org.codehaus.jackson">JsonProcessingException</a></pre> 170<div class="block"><span class="strong">Deprecated.</span> </div> 171<dl><dt><span class="strong">Throws:</span></dt> 172<dd><code><a href="http://docs.oracle.com/javase/6/docs/api/java/io/IOException.html?is-external=true" title="class or interface in java.io">IOException</a></code></dd> 173<dd><code><a href="../../../../org/codehaus/jackson/JsonProcessingException.html" title="class in org.codehaus.jackson">JsonProcessingException</a></code></dd></dl> 174</li> 175</ul> 176</li> 177</ul> 178</li> 179</ul> 180</div> 181</div> 182<!-- ========= END OF CLASS DATA ========= --> 183<!-- ======= START OF BOTTOM NAVBAR ====== --> 184<div class="bottomNav"><a name="navbar_bottom"> 185<!-- --> 186</a><a href="#skip-navbar_bottom" title="Skip navigation links"></a><a name="navbar_bottom_firstrow"> 187<!-- --> 188</a> 189<ul class="navList" title="Navigation"> 190<li><a href="../../../../overview-summary.html">Overview</a></li> 191<li><a href="package-summary.html">Package</a></li> 192<li class="navBarCell1Rev">Class</li> 193<li><a href="class-use/JsonSerializable.html">Use</a></li> 194<li><a href="package-tree.html">Tree</a></li> 195<li><a href="../../../../deprecated-list.html">Deprecated</a></li> 196<li><a href="../../../../index-all.html">Index</a></li> 197<li><a href="../../../../help-doc.html">Help</a></li> 198</ul> 199</div> 200<div class="subNav"> 201<ul class="navList"> 202<li><a href="../../../../org/codehaus/jackson/map/JsonMappingException.Reference.html" title="class in org.codehaus.jackson.map"><span class="strong">Prev Class</span></a></li> 203<li><a href="../../../../org/codehaus/jackson/map/JsonSerializableWithType.html" title="interface in org.codehaus.jackson.map"><span class="strong">Next Class</span></a></li> 204</ul> 205<ul class="navList"> 206<li><a href="../../../../index.html?org/codehaus/jackson/map/JsonSerializable.html" target="_top">Frames</a></li> 207<li><a href="JsonSerializable.html" target="_top">No Frames</a></li> 208</ul> 209<ul class="navList" id="allclasses_navbar_bottom"> 210<li><a href="../../../../allclasses-noframe.html">All Classes</a></li> 211</ul> 212<div> 213<script type="text/javascript"><!-- 214 allClassesLink = document.getElementById("allclasses_navbar_bottom"); 215 if(window==top) { 216 allClassesLink.style.display = "block"; 217 } 218 else { 219 allClassesLink.style.display = "none"; 220 } 221 //--> 222</script> 223</div> 224<div> 225<ul class="subNavList"> 226<li>Summary: </li> 227<li>Nested | </li> 228<li>Field | </li> 229<li>Constr | </li> 230<li><a href="#method_summary">Method</a></li> 231</ul> 232<ul class="subNavList"> 233<li>Detail: </li> 234<li>Field | </li> 235<li>Constr | </li> 236<li><a href="#method_detail">Method</a></li> 237</ul> 238</div> 239<a name="skip-navbar_bottom"> 240<!-- --> 241</a></div> 242<!-- ======== END OF BOTTOM NAVBAR ======= --> 243</body> 244</html> 245