juneau-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jamesbog...@apache.org
Subject [06/32] incubator-juneau-website git commit: Update javadocs
Date Thu, 01 Jun 2017 23:55:24 GMT
http://git-wip-us.apache.org/repos/asf/incubator-juneau-website/blob/19e9b7df/content/site/apidocs/src-html/org/apache/juneau/serializer/PartSerializer.html
----------------------------------------------------------------------
diff --git a/content/site/apidocs/src-html/org/apache/juneau/serializer/PartSerializer.html b/content/site/apidocs/src-html/org/apache/juneau/serializer/PartSerializer.html
index 619681a..c212cb9 100644
--- a/content/site/apidocs/src-html/org/apache/juneau/serializer/PartSerializer.html
+++ b/content/site/apidocs/src-html/org/apache/juneau/serializer/PartSerializer.html
@@ -39,25 +39,26 @@
 <span class="sourceLineNo">031</span> *    &lt;li&gt;{@link Header#serializer()}<a name="line.31"></a>
 <span class="sourceLineNo">032</span> *    &lt;li&gt;{@link HeaderIfNE#serializer()}<a name="line.32"></a>
 <span class="sourceLineNo">033</span> *    &lt;li&gt;{@link Path#serializer()}<a name="line.33"></a>
-<span class="sourceLineNo">034</span> *    &lt;li&gt;&lt;code&gt;RestClientBuilder.partSerializer(Class)&lt;/code&gt;<a name="line.34"></a>
-<span class="sourceLineNo">035</span> * &lt;/ul&gt;<a name="line.35"></a>
-<span class="sourceLineNo">036</span> * &lt;p&gt;<a name="line.36"></a>
-<span class="sourceLineNo">037</span> * Implementations must include a no-arg constructor.<a name="line.37"></a>
-<span class="sourceLineNo">038</span> */<a name="line.38"></a>
-<span class="sourceLineNo">039</span>public interface PartSerializer {<a name="line.39"></a>
-<span class="sourceLineNo">040</span><a name="line.40"></a>
-<span class="sourceLineNo">041</span>   /**<a name="line.41"></a>
-<span class="sourceLineNo">042</span>    * Converts the specified value to a string that can be used as an HTTP header value, query parameter value,<a name="line.42"></a>
-<span class="sourceLineNo">043</span>    * form-data parameter, or URI path variable.<a name="line.43"></a>
-<span class="sourceLineNo">044</span>    * &lt;p&gt;<a name="line.44"></a>
-<span class="sourceLineNo">045</span>    * Returned values should NOT be URL-encoded.  This will happen automatically.<a name="line.45"></a>
-<span class="sourceLineNo">046</span>    *<a name="line.46"></a>
-<span class="sourceLineNo">047</span>    * @param type The category of value being serialized.<a name="line.47"></a>
-<span class="sourceLineNo">048</span>    * @param value The value being serialized.<a name="line.48"></a>
-<span class="sourceLineNo">049</span>    * @return The serialized value.<a name="line.49"></a>
-<span class="sourceLineNo">050</span>    */<a name="line.50"></a>
-<span class="sourceLineNo">051</span>   public String serialize(PartType type, Object value);<a name="line.51"></a>
-<span class="sourceLineNo">052</span>}<a name="line.52"></a>
+<span class="sourceLineNo">034</span> *    &lt;li&gt;{@link RequestBean#serializer()}<a name="line.34"></a>
+<span class="sourceLineNo">035</span> *    &lt;li&gt;&lt;code&gt;RestClientBuilder.partSerializer(Class)&lt;/code&gt;<a name="line.35"></a>
+<span class="sourceLineNo">036</span> * &lt;/ul&gt;<a name="line.36"></a>
+<span class="sourceLineNo">037</span> * &lt;p&gt;<a name="line.37"></a>
+<span class="sourceLineNo">038</span> * Implementations must include a no-arg constructor.<a name="line.38"></a>
+<span class="sourceLineNo">039</span> */<a name="line.39"></a>
+<span class="sourceLineNo">040</span>public interface PartSerializer {<a name="line.40"></a>
+<span class="sourceLineNo">041</span><a name="line.41"></a>
+<span class="sourceLineNo">042</span>   /**<a name="line.42"></a>
+<span class="sourceLineNo">043</span>    * Converts the specified value to a string that can be used as an HTTP header value, query parameter value,<a name="line.43"></a>
+<span class="sourceLineNo">044</span>    * form-data parameter, or URI path variable.<a name="line.44"></a>
+<span class="sourceLineNo">045</span>    * &lt;p&gt;<a name="line.45"></a>
+<span class="sourceLineNo">046</span>    * Returned values should NOT be URL-encoded.  This will happen automatically.<a name="line.46"></a>
+<span class="sourceLineNo">047</span>    *<a name="line.47"></a>
+<span class="sourceLineNo">048</span>    * @param type The category of value being serialized.<a name="line.48"></a>
+<span class="sourceLineNo">049</span>    * @param value The value being serialized.<a name="line.49"></a>
+<span class="sourceLineNo">050</span>    * @return The serialized value.<a name="line.50"></a>
+<span class="sourceLineNo">051</span>    */<a name="line.51"></a>
+<span class="sourceLineNo">052</span>   public String serialize(PartType type, Object value);<a name="line.52"></a>
+<span class="sourceLineNo">053</span>}<a name="line.53"></a>
 
 
 

http://git-wip-us.apache.org/repos/asf/incubator-juneau-website/blob/19e9b7df/content/site/apidocs/src-html/org/apache/juneau/uon/UonSerializer.Encoding.html
----------------------------------------------------------------------
diff --git a/content/site/apidocs/src-html/org/apache/juneau/uon/UonSerializer.Encoding.html b/content/site/apidocs/src-html/org/apache/juneau/uon/UonSerializer.Encoding.html
index 925d438..a90bf34 100644
--- a/content/site/apidocs/src-html/org/apache/juneau/uon/UonSerializer.Encoding.html
+++ b/content/site/apidocs/src-html/org/apache/juneau/uon/UonSerializer.Encoding.html
@@ -212,188 +212,195 @@
 <span class="sourceLineNo">204</span>    * @param eType The expected type of the object if this is a bean property.<a name="line.204"></a>
 <span class="sourceLineNo">205</span>    * @param attrName The bean property name if this is a bean property.  &lt;jk&gt;null&lt;/jk&gt; if this isn't a bean property being serialized.<a name="line.205"></a>
 <span class="sourceLineNo">206</span>    * @param pMeta The bean property metadata.<a name="line.206"></a>
-<span class="sourceLineNo">207</span>    * @param plainTextParams &lt;jk&gt;true&lt;/jk&gt; if this is a top level parameter key or value and paramFormat is PLAINTEXT.<a name="line.207"></a>
-<span class="sourceLineNo">208</span>    *<a name="line.208"></a>
-<span class="sourceLineNo">209</span>    * @return The same writer passed in.<a name="line.209"></a>
-<span class="sourceLineNo">210</span>    * @throws Exception<a name="line.210"></a>
-<span class="sourceLineNo">211</span>    */<a name="line.211"></a>
-<span class="sourceLineNo">212</span>   @SuppressWarnings({ "rawtypes", "unchecked" })<a name="line.212"></a>
-<span class="sourceLineNo">213</span>   protected SerializerWriter serializeAnything(UonSerializerSession session, UonWriter out, Object o, ClassMeta&lt;?&gt; eType,<a name="line.213"></a>
-<span class="sourceLineNo">214</span>         String attrName, BeanPropertyMeta pMeta, boolean plainTextParams) throws Exception {<a name="line.214"></a>
-<span class="sourceLineNo">215</span><a name="line.215"></a>
-<span class="sourceLineNo">216</span>      if (o == null) {<a name="line.216"></a>
-<span class="sourceLineNo">217</span>         out.appendObject(null, false, plainTextParams);<a name="line.217"></a>
-<span class="sourceLineNo">218</span>         return out;<a name="line.218"></a>
-<span class="sourceLineNo">219</span>      }<a name="line.219"></a>
-<span class="sourceLineNo">220</span><a name="line.220"></a>
-<span class="sourceLineNo">221</span>      if (eType == null)<a name="line.221"></a>
-<span class="sourceLineNo">222</span>         eType = object();<a name="line.222"></a>
-<span class="sourceLineNo">223</span><a name="line.223"></a>
-<span class="sourceLineNo">224</span>      ClassMeta&lt;?&gt; aType;        // The actual type<a name="line.224"></a>
-<span class="sourceLineNo">225</span>      ClassMeta&lt;?&gt; sType;        // The serialized type<a name="line.225"></a>
-<span class="sourceLineNo">226</span><a name="line.226"></a>
-<span class="sourceLineNo">227</span>      aType = session.push(attrName, o, eType);<a name="line.227"></a>
-<span class="sourceLineNo">228</span>      boolean isRecursion = aType == null;<a name="line.228"></a>
-<span class="sourceLineNo">229</span><a name="line.229"></a>
-<span class="sourceLineNo">230</span>      // Handle recursion<a name="line.230"></a>
-<span class="sourceLineNo">231</span>      if (aType == null) {<a name="line.231"></a>
-<span class="sourceLineNo">232</span>         o = null;<a name="line.232"></a>
-<span class="sourceLineNo">233</span>         aType = object();<a name="line.233"></a>
-<span class="sourceLineNo">234</span>      }<a name="line.234"></a>
-<span class="sourceLineNo">235</span><a name="line.235"></a>
-<span class="sourceLineNo">236</span>      sType = aType.getSerializedClassMeta();<a name="line.236"></a>
-<span class="sourceLineNo">237</span>      String typeName = session.getBeanTypeName(eType, aType, pMeta);<a name="line.237"></a>
-<span class="sourceLineNo">238</span><a name="line.238"></a>
-<span class="sourceLineNo">239</span>      // Swap if necessary<a name="line.239"></a>
-<span class="sourceLineNo">240</span>      PojoSwap swap = aType.getPojoSwap();<a name="line.240"></a>
-<span class="sourceLineNo">241</span>      if (swap != null) {<a name="line.241"></a>
-<span class="sourceLineNo">242</span>         o = swap.swap(session, o);<a name="line.242"></a>
-<span class="sourceLineNo">243</span><a name="line.243"></a>
-<span class="sourceLineNo">244</span>         // If the getSwapClass() method returns Object, we need to figure out<a name="line.244"></a>
-<span class="sourceLineNo">245</span>         // the actual type now.<a name="line.245"></a>
-<span class="sourceLineNo">246</span>         if (sType.isObject())<a name="line.246"></a>
-<span class="sourceLineNo">247</span>            sType = session.getClassMetaForObject(o);<a name="line.247"></a>
-<span class="sourceLineNo">248</span>      }<a name="line.248"></a>
-<span class="sourceLineNo">249</span><a name="line.249"></a>
-<span class="sourceLineNo">250</span>      // '\0' characters are considered null.<a name="line.250"></a>
-<span class="sourceLineNo">251</span>      if (o == null || (sType.isChar() &amp;&amp; ((Character)o).charValue() == 0))<a name="line.251"></a>
-<span class="sourceLineNo">252</span>         out.appendObject(null, false, plainTextParams);<a name="line.252"></a>
-<span class="sourceLineNo">253</span>      else if (sType.isBoolean())<a name="line.253"></a>
-<span class="sourceLineNo">254</span>         out.appendBoolean(o);<a name="line.254"></a>
-<span class="sourceLineNo">255</span>      else if (sType.isNumber())<a name="line.255"></a>
-<span class="sourceLineNo">256</span>         out.appendNumber(o);<a name="line.256"></a>
-<span class="sourceLineNo">257</span>      else if (sType.isBean())<a name="line.257"></a>
-<span class="sourceLineNo">258</span>         serializeBeanMap(session, out, session.toBeanMap(o), typeName);<a name="line.258"></a>
-<span class="sourceLineNo">259</span>      else if (sType.isUri() || (pMeta != null &amp;&amp; pMeta.isUri()))<a name="line.259"></a>
-<span class="sourceLineNo">260</span>         out.appendUri(o);<a name="line.260"></a>
-<span class="sourceLineNo">261</span>      else if (sType.isMap()) {<a name="line.261"></a>
-<span class="sourceLineNo">262</span>         if (o instanceof BeanMap)<a name="line.262"></a>
-<span class="sourceLineNo">263</span>            serializeBeanMap(session, out, (BeanMap)o, typeName);<a name="line.263"></a>
-<span class="sourceLineNo">264</span>         else<a name="line.264"></a>
-<span class="sourceLineNo">265</span>            serializeMap(session, out, (Map)o, eType);<a name="line.265"></a>
-<span class="sourceLineNo">266</span>      }<a name="line.266"></a>
-<span class="sourceLineNo">267</span>      else if (sType.isCollection()) {<a name="line.267"></a>
-<span class="sourceLineNo">268</span>         serializeCollection(session, out, (Collection) o, eType);<a name="line.268"></a>
-<span class="sourceLineNo">269</span>      }<a name="line.269"></a>
-<span class="sourceLineNo">270</span>      else if (sType.isArray()) {<a name="line.270"></a>
-<span class="sourceLineNo">271</span>         serializeCollection(session, out, toList(sType.getInnerClass(), o), eType);<a name="line.271"></a>
-<span class="sourceLineNo">272</span>      }<a name="line.272"></a>
-<span class="sourceLineNo">273</span>      else {<a name="line.273"></a>
-<span class="sourceLineNo">274</span>         out.appendObject(o, false, plainTextParams);<a name="line.274"></a>
-<span class="sourceLineNo">275</span>      }<a name="line.275"></a>
-<span class="sourceLineNo">276</span><a name="line.276"></a>
-<span class="sourceLineNo">277</span>      if (! isRecursion)<a name="line.277"></a>
-<span class="sourceLineNo">278</span>         session.pop();<a name="line.278"></a>
-<span class="sourceLineNo">279</span>      return out;<a name="line.279"></a>
-<span class="sourceLineNo">280</span>   }<a name="line.280"></a>
-<span class="sourceLineNo">281</span><a name="line.281"></a>
-<span class="sourceLineNo">282</span>   @SuppressWarnings({ "rawtypes", "unchecked" })<a name="line.282"></a>
-<span class="sourceLineNo">283</span>   private SerializerWriter serializeMap(UonSerializerSession session, UonWriter out, Map m, ClassMeta&lt;?&gt; type) throws Exception {<a name="line.283"></a>
-<span class="sourceLineNo">284</span><a name="line.284"></a>
-<span class="sourceLineNo">285</span>      m = session.sort(m);<a name="line.285"></a>
-<span class="sourceLineNo">286</span><a name="line.286"></a>
-<span class="sourceLineNo">287</span>      ClassMeta&lt;?&gt; keyType = type.getKeyType(), valueType = type.getValueType();<a name="line.287"></a>
-<span class="sourceLineNo">288</span><a name="line.288"></a>
-<span class="sourceLineNo">289</span>      int depth = session.getIndent();<a name="line.289"></a>
-<span class="sourceLineNo">290</span>      out.append('(');<a name="line.290"></a>
-<span class="sourceLineNo">291</span><a name="line.291"></a>
-<span class="sourceLineNo">292</span>      Iterator mapEntries = m.entrySet().iterator();<a name="line.292"></a>
-<span class="sourceLineNo">293</span><a name="line.293"></a>
-<span class="sourceLineNo">294</span>      while (mapEntries.hasNext()) {<a name="line.294"></a>
-<span class="sourceLineNo">295</span>         Map.Entry e = (Map.Entry) mapEntries.next();<a name="line.295"></a>
-<span class="sourceLineNo">296</span>         Object value = e.getValue();<a name="line.296"></a>
-<span class="sourceLineNo">297</span>         Object key = session.generalize(e.getKey(), keyType);<a name="line.297"></a>
-<span class="sourceLineNo">298</span>         out.cr(depth).appendObject(key, false, false).append('=');<a name="line.298"></a>
-<span class="sourceLineNo">299</span>         serializeAnything(session, out, value, valueType, (key == null ? null : session.toString(key)), null, false);<a name="line.299"></a>
-<span class="sourceLineNo">300</span>         if (mapEntries.hasNext())<a name="line.300"></a>
-<span class="sourceLineNo">301</span>            out.append(',');<a name="line.301"></a>
-<span class="sourceLineNo">302</span>      }<a name="line.302"></a>
-<span class="sourceLineNo">303</span><a name="line.303"></a>
-<span class="sourceLineNo">304</span>      if (m.size() &gt; 0)<a name="line.304"></a>
-<span class="sourceLineNo">305</span>         out.cr(depth-1);<a name="line.305"></a>
-<span class="sourceLineNo">306</span>      out.append(')');<a name="line.306"></a>
+<span class="sourceLineNo">207</span>    *<a name="line.207"></a>
+<span class="sourceLineNo">208</span>    * @return The same writer passed in.<a name="line.208"></a>
+<span class="sourceLineNo">209</span>    * @throws Exception<a name="line.209"></a>
+<span class="sourceLineNo">210</span>    */<a name="line.210"></a>
+<span class="sourceLineNo">211</span>   @SuppressWarnings({ "rawtypes", "unchecked" })<a name="line.211"></a>
+<span class="sourceLineNo">212</span>   protected SerializerWriter serializeAnything(UonSerializerSession session, UonWriter out, Object o, ClassMeta&lt;?&gt; eType,<a name="line.212"></a>
+<span class="sourceLineNo">213</span>         String attrName, BeanPropertyMeta pMeta) throws Exception {<a name="line.213"></a>
+<span class="sourceLineNo">214</span><a name="line.214"></a>
+<span class="sourceLineNo">215</span>      if (o == null) {<a name="line.215"></a>
+<span class="sourceLineNo">216</span>         out.appendObject(null, false);<a name="line.216"></a>
+<span class="sourceLineNo">217</span>         return out;<a name="line.217"></a>
+<span class="sourceLineNo">218</span>      }<a name="line.218"></a>
+<span class="sourceLineNo">219</span><a name="line.219"></a>
+<span class="sourceLineNo">220</span>      if (eType == null)<a name="line.220"></a>
+<span class="sourceLineNo">221</span>         eType = object();<a name="line.221"></a>
+<span class="sourceLineNo">222</span><a name="line.222"></a>
+<span class="sourceLineNo">223</span>      ClassMeta&lt;?&gt; aType;        // The actual type<a name="line.223"></a>
+<span class="sourceLineNo">224</span>      ClassMeta&lt;?&gt; sType;        // The serialized type<a name="line.224"></a>
+<span class="sourceLineNo">225</span><a name="line.225"></a>
+<span class="sourceLineNo">226</span>      aType = session.push(attrName, o, eType);<a name="line.226"></a>
+<span class="sourceLineNo">227</span>      boolean isRecursion = aType == null;<a name="line.227"></a>
+<span class="sourceLineNo">228</span><a name="line.228"></a>
+<span class="sourceLineNo">229</span>      // Handle recursion<a name="line.229"></a>
+<span class="sourceLineNo">230</span>      if (aType == null) {<a name="line.230"></a>
+<span class="sourceLineNo">231</span>         o = null;<a name="line.231"></a>
+<span class="sourceLineNo">232</span>         aType = object();<a name="line.232"></a>
+<span class="sourceLineNo">233</span>      }<a name="line.233"></a>
+<span class="sourceLineNo">234</span><a name="line.234"></a>
+<span class="sourceLineNo">235</span>      sType = aType.getSerializedClassMeta();<a name="line.235"></a>
+<span class="sourceLineNo">236</span>      String typeName = session.getBeanTypeName(eType, aType, pMeta);<a name="line.236"></a>
+<span class="sourceLineNo">237</span><a name="line.237"></a>
+<span class="sourceLineNo">238</span>      // Swap if necessary<a name="line.238"></a>
+<span class="sourceLineNo">239</span>      PojoSwap swap = aType.getPojoSwap();<a name="line.239"></a>
+<span class="sourceLineNo">240</span>      if (swap != null) {<a name="line.240"></a>
+<span class="sourceLineNo">241</span>         o = swap.swap(session, o);<a name="line.241"></a>
+<span class="sourceLineNo">242</span><a name="line.242"></a>
+<span class="sourceLineNo">243</span>         // If the getSwapClass() method returns Object, we need to figure out<a name="line.243"></a>
+<span class="sourceLineNo">244</span>         // the actual type now.<a name="line.244"></a>
+<span class="sourceLineNo">245</span>         if (sType.isObject())<a name="line.245"></a>
+<span class="sourceLineNo">246</span>            sType = session.getClassMetaForObject(o);<a name="line.246"></a>
+<span class="sourceLineNo">247</span>      }<a name="line.247"></a>
+<span class="sourceLineNo">248</span><a name="line.248"></a>
+<span class="sourceLineNo">249</span>      // '\0' characters are considered null.<a name="line.249"></a>
+<span class="sourceLineNo">250</span>      if (o == null || (sType.isChar() &amp;&amp; ((Character)o).charValue() == 0))<a name="line.250"></a>
+<span class="sourceLineNo">251</span>         out.appendObject(null, false);<a name="line.251"></a>
+<span class="sourceLineNo">252</span>      else if (sType.isBoolean())<a name="line.252"></a>
+<span class="sourceLineNo">253</span>         out.appendBoolean(o);<a name="line.253"></a>
+<span class="sourceLineNo">254</span>      else if (sType.isNumber())<a name="line.254"></a>
+<span class="sourceLineNo">255</span>         out.appendNumber(o);<a name="line.255"></a>
+<span class="sourceLineNo">256</span>      else if (sType.isBean())<a name="line.256"></a>
+<span class="sourceLineNo">257</span>         serializeBeanMap(session, out, session.toBeanMap(o), typeName);<a name="line.257"></a>
+<span class="sourceLineNo">258</span>      else if (sType.isUri() || (pMeta != null &amp;&amp; pMeta.isUri()))<a name="line.258"></a>
+<span class="sourceLineNo">259</span>         out.appendUri(o);<a name="line.259"></a>
+<span class="sourceLineNo">260</span>      else if (sType.isMap()) {<a name="line.260"></a>
+<span class="sourceLineNo">261</span>         if (o instanceof BeanMap)<a name="line.261"></a>
+<span class="sourceLineNo">262</span>            serializeBeanMap(session, out, (BeanMap)o, typeName);<a name="line.262"></a>
+<span class="sourceLineNo">263</span>         else<a name="line.263"></a>
+<span class="sourceLineNo">264</span>            serializeMap(session, out, (Map)o, eType);<a name="line.264"></a>
+<span class="sourceLineNo">265</span>      }<a name="line.265"></a>
+<span class="sourceLineNo">266</span>      else if (sType.isCollection()) {<a name="line.266"></a>
+<span class="sourceLineNo">267</span>         serializeCollection(session, out, (Collection) o, eType);<a name="line.267"></a>
+<span class="sourceLineNo">268</span>      }<a name="line.268"></a>
+<span class="sourceLineNo">269</span>      else if (sType.isArray()) {<a name="line.269"></a>
+<span class="sourceLineNo">270</span>         serializeCollection(session, out, toList(sType.getInnerClass(), o), eType);<a name="line.270"></a>
+<span class="sourceLineNo">271</span>      }<a name="line.271"></a>
+<span class="sourceLineNo">272</span>      else {<a name="line.272"></a>
+<span class="sourceLineNo">273</span>         out.appendObject(o, false);<a name="line.273"></a>
+<span class="sourceLineNo">274</span>      }<a name="line.274"></a>
+<span class="sourceLineNo">275</span><a name="line.275"></a>
+<span class="sourceLineNo">276</span>      if (! isRecursion)<a name="line.276"></a>
+<span class="sourceLineNo">277</span>         session.pop();<a name="line.277"></a>
+<span class="sourceLineNo">278</span>      return out;<a name="line.278"></a>
+<span class="sourceLineNo">279</span>   }<a name="line.279"></a>
+<span class="sourceLineNo">280</span><a name="line.280"></a>
+<span class="sourceLineNo">281</span>   @SuppressWarnings({ "rawtypes", "unchecked" })<a name="line.281"></a>
+<span class="sourceLineNo">282</span>   private SerializerWriter serializeMap(UonSerializerSession session, UonWriter out, Map m, ClassMeta&lt;?&gt; type) throws Exception {<a name="line.282"></a>
+<span class="sourceLineNo">283</span><a name="line.283"></a>
+<span class="sourceLineNo">284</span>      m = session.sort(m);<a name="line.284"></a>
+<span class="sourceLineNo">285</span><a name="line.285"></a>
+<span class="sourceLineNo">286</span>      ClassMeta&lt;?&gt; keyType = type.getKeyType(), valueType = type.getValueType();<a name="line.286"></a>
+<span class="sourceLineNo">287</span><a name="line.287"></a>
+<span class="sourceLineNo">288</span>      int depth = session.getIndent();<a name="line.288"></a>
+<span class="sourceLineNo">289</span><a name="line.289"></a>
+<span class="sourceLineNo">290</span>      if (! session.isPlainTextParams())<a name="line.290"></a>
+<span class="sourceLineNo">291</span>         out.append('(');<a name="line.291"></a>
+<span class="sourceLineNo">292</span><a name="line.292"></a>
+<span class="sourceLineNo">293</span>      Iterator mapEntries = m.entrySet().iterator();<a name="line.293"></a>
+<span class="sourceLineNo">294</span><a name="line.294"></a>
+<span class="sourceLineNo">295</span>      while (mapEntries.hasNext()) {<a name="line.295"></a>
+<span class="sourceLineNo">296</span>         Map.Entry e = (Map.Entry) mapEntries.next();<a name="line.296"></a>
+<span class="sourceLineNo">297</span>         Object value = e.getValue();<a name="line.297"></a>
+<span class="sourceLineNo">298</span>         Object key = session.generalize(e.getKey(), keyType);<a name="line.298"></a>
+<span class="sourceLineNo">299</span>         out.cr(depth).appendObject(key, false).append('=');<a name="line.299"></a>
+<span class="sourceLineNo">300</span>         serializeAnything(session, out, value, valueType, (key == null ? null : session.toString(key)), null);<a name="line.300"></a>
+<span class="sourceLineNo">301</span>         if (mapEntries.hasNext())<a name="line.301"></a>
+<span class="sourceLineNo">302</span>            out.append(',');<a name="line.302"></a>
+<span class="sourceLineNo">303</span>      }<a name="line.303"></a>
+<span class="sourceLineNo">304</span><a name="line.304"></a>
+<span class="sourceLineNo">305</span>      if (m.size() &gt; 0)<a name="line.305"></a>
+<span class="sourceLineNo">306</span>         out.cr(depth-1);<a name="line.306"></a>
 <span class="sourceLineNo">307</span><a name="line.307"></a>
-<span class="sourceLineNo">308</span>      return out;<a name="line.308"></a>
-<span class="sourceLineNo">309</span>   }<a name="line.309"></a>
+<span class="sourceLineNo">308</span>      if (! session.isPlainTextParams())<a name="line.308"></a>
+<span class="sourceLineNo">309</span>         out.append(')');<a name="line.309"></a>
 <span class="sourceLineNo">310</span><a name="line.310"></a>
-<span class="sourceLineNo">311</span>   private SerializerWriter serializeBeanMap(UonSerializerSession session, UonWriter out, BeanMap&lt;?&gt; m, String typeName) throws Exception {<a name="line.311"></a>
-<span class="sourceLineNo">312</span>      int depth = session.getIndent();<a name="line.312"></a>
+<span class="sourceLineNo">311</span>      return out;<a name="line.311"></a>
+<span class="sourceLineNo">312</span>   }<a name="line.312"></a>
 <span class="sourceLineNo">313</span><a name="line.313"></a>
-<span class="sourceLineNo">314</span>      out.append('(');<a name="line.314"></a>
-<span class="sourceLineNo">315</span><a name="line.315"></a>
-<span class="sourceLineNo">316</span>      boolean addComma = false;<a name="line.316"></a>
-<span class="sourceLineNo">317</span><a name="line.317"></a>
-<span class="sourceLineNo">318</span>      for (BeanPropertyValue p : m.getValues(session.isTrimNulls(), typeName != null ? session.createBeanTypeNameProperty(m, typeName) : null)) {<a name="line.318"></a>
-<span class="sourceLineNo">319</span>         BeanPropertyMeta pMeta = p.getMeta();<a name="line.319"></a>
-<span class="sourceLineNo">320</span>         ClassMeta&lt;?&gt; cMeta = p.getClassMeta();<a name="line.320"></a>
+<span class="sourceLineNo">314</span>   private SerializerWriter serializeBeanMap(UonSerializerSession session, UonWriter out, BeanMap&lt;?&gt; m, String typeName) throws Exception {<a name="line.314"></a>
+<span class="sourceLineNo">315</span>      int depth = session.getIndent();<a name="line.315"></a>
+<span class="sourceLineNo">316</span><a name="line.316"></a>
+<span class="sourceLineNo">317</span>      if (! session.isPlainTextParams())<a name="line.317"></a>
+<span class="sourceLineNo">318</span>         out.append('(');<a name="line.318"></a>
+<span class="sourceLineNo">319</span><a name="line.319"></a>
+<span class="sourceLineNo">320</span>      boolean addComma = false;<a name="line.320"></a>
 <span class="sourceLineNo">321</span><a name="line.321"></a>
-<span class="sourceLineNo">322</span>         String key = p.getName();<a name="line.322"></a>
-<span class="sourceLineNo">323</span>         Object value = p.getValue();<a name="line.323"></a>
-<span class="sourceLineNo">324</span>         Throwable t = p.getThrown();<a name="line.324"></a>
-<span class="sourceLineNo">325</span>         if (t != null)<a name="line.325"></a>
-<span class="sourceLineNo">326</span>            session.addBeanGetterWarning(pMeta, t);<a name="line.326"></a>
-<span class="sourceLineNo">327</span><a name="line.327"></a>
-<span class="sourceLineNo">328</span>         if (session.canIgnoreValue(cMeta, key, value))<a name="line.328"></a>
-<span class="sourceLineNo">329</span>            continue;<a name="line.329"></a>
-<span class="sourceLineNo">330</span><a name="line.330"></a>
-<span class="sourceLineNo">331</span>         if (addComma)<a name="line.331"></a>
-<span class="sourceLineNo">332</span>            out.append(',');<a name="line.332"></a>
-<span class="sourceLineNo">333</span><a name="line.333"></a>
-<span class="sourceLineNo">334</span>         out.cr(depth).appendObject(key, false, false).append('=');<a name="line.334"></a>
-<span class="sourceLineNo">335</span><a name="line.335"></a>
-<span class="sourceLineNo">336</span>         serializeAnything(session, out, value, cMeta, key, pMeta, false);<a name="line.336"></a>
+<span class="sourceLineNo">322</span>      for (BeanPropertyValue p : m.getValues(session.isTrimNulls(), typeName != null ? session.createBeanTypeNameProperty(m, typeName) : null)) {<a name="line.322"></a>
+<span class="sourceLineNo">323</span>         BeanPropertyMeta pMeta = p.getMeta();<a name="line.323"></a>
+<span class="sourceLineNo">324</span>         ClassMeta&lt;?&gt; cMeta = p.getClassMeta();<a name="line.324"></a>
+<span class="sourceLineNo">325</span><a name="line.325"></a>
+<span class="sourceLineNo">326</span>         String key = p.getName();<a name="line.326"></a>
+<span class="sourceLineNo">327</span>         Object value = p.getValue();<a name="line.327"></a>
+<span class="sourceLineNo">328</span>         Throwable t = p.getThrown();<a name="line.328"></a>
+<span class="sourceLineNo">329</span>         if (t != null)<a name="line.329"></a>
+<span class="sourceLineNo">330</span>            session.addBeanGetterWarning(pMeta, t);<a name="line.330"></a>
+<span class="sourceLineNo">331</span><a name="line.331"></a>
+<span class="sourceLineNo">332</span>         if (session.canIgnoreValue(cMeta, key, value))<a name="line.332"></a>
+<span class="sourceLineNo">333</span>            continue;<a name="line.333"></a>
+<span class="sourceLineNo">334</span><a name="line.334"></a>
+<span class="sourceLineNo">335</span>         if (addComma)<a name="line.335"></a>
+<span class="sourceLineNo">336</span>            out.append(',');<a name="line.336"></a>
 <span class="sourceLineNo">337</span><a name="line.337"></a>
-<span class="sourceLineNo">338</span>         addComma = true;<a name="line.338"></a>
-<span class="sourceLineNo">339</span>      }<a name="line.339"></a>
-<span class="sourceLineNo">340</span><a name="line.340"></a>
-<span class="sourceLineNo">341</span>      if (m.size() &gt; 0)<a name="line.341"></a>
-<span class="sourceLineNo">342</span>         out.cr(depth-1);<a name="line.342"></a>
-<span class="sourceLineNo">343</span>      out.append(')');<a name="line.343"></a>
+<span class="sourceLineNo">338</span>         out.cr(depth).appendObject(key, false).append('=');<a name="line.338"></a>
+<span class="sourceLineNo">339</span><a name="line.339"></a>
+<span class="sourceLineNo">340</span>         serializeAnything(session, out, value, cMeta, key, pMeta);<a name="line.340"></a>
+<span class="sourceLineNo">341</span><a name="line.341"></a>
+<span class="sourceLineNo">342</span>         addComma = true;<a name="line.342"></a>
+<span class="sourceLineNo">343</span>      }<a name="line.343"></a>
 <span class="sourceLineNo">344</span><a name="line.344"></a>
-<span class="sourceLineNo">345</span>      return out;<a name="line.345"></a>
-<span class="sourceLineNo">346</span>   }<a name="line.346"></a>
-<span class="sourceLineNo">347</span><a name="line.347"></a>
-<span class="sourceLineNo">348</span>   @SuppressWarnings({ "rawtypes", "unchecked" })<a name="line.348"></a>
-<span class="sourceLineNo">349</span>   private SerializerWriter serializeCollection(UonSerializerSession session, UonWriter out, Collection c, ClassMeta&lt;?&gt; type) throws Exception {<a name="line.349"></a>
-<span class="sourceLineNo">350</span><a name="line.350"></a>
-<span class="sourceLineNo">351</span>      ClassMeta&lt;?&gt; elementType = type.getElementType();<a name="line.351"></a>
+<span class="sourceLineNo">345</span>      if (m.size() &gt; 0)<a name="line.345"></a>
+<span class="sourceLineNo">346</span>         out.cr(depth-1);<a name="line.346"></a>
+<span class="sourceLineNo">347</span>      if (! session.isPlainTextParams())<a name="line.347"></a>
+<span class="sourceLineNo">348</span>         out.append(')');<a name="line.348"></a>
+<span class="sourceLineNo">349</span><a name="line.349"></a>
+<span class="sourceLineNo">350</span>      return out;<a name="line.350"></a>
+<span class="sourceLineNo">351</span>   }<a name="line.351"></a>
 <span class="sourceLineNo">352</span><a name="line.352"></a>
-<span class="sourceLineNo">353</span>      c = session.sort(c);<a name="line.353"></a>
-<span class="sourceLineNo">354</span><a name="line.354"></a>
-<span class="sourceLineNo">355</span>      out.append('@').append('(');<a name="line.355"></a>
-<span class="sourceLineNo">356</span><a name="line.356"></a>
-<span class="sourceLineNo">357</span>      int depth = session.getIndent();<a name="line.357"></a>
-<span class="sourceLineNo">358</span><a name="line.358"></a>
-<span class="sourceLineNo">359</span>      for (Iterator i = c.iterator(); i.hasNext();) {<a name="line.359"></a>
-<span class="sourceLineNo">360</span>         out.cr(depth);<a name="line.360"></a>
-<span class="sourceLineNo">361</span>         serializeAnything(session, out, i.next(), elementType, "&lt;iterator&gt;", null, false);<a name="line.361"></a>
-<span class="sourceLineNo">362</span>         if (i.hasNext())<a name="line.362"></a>
-<span class="sourceLineNo">363</span>            out.append(',');<a name="line.363"></a>
-<span class="sourceLineNo">364</span>      }<a name="line.364"></a>
-<span class="sourceLineNo">365</span><a name="line.365"></a>
-<span class="sourceLineNo">366</span>      if (c.size() &gt; 0)<a name="line.366"></a>
-<span class="sourceLineNo">367</span>         out.cr(depth-1);<a name="line.367"></a>
-<span class="sourceLineNo">368</span>      out.append(')');<a name="line.368"></a>
-<span class="sourceLineNo">369</span><a name="line.369"></a>
-<span class="sourceLineNo">370</span>      return out;<a name="line.370"></a>
-<span class="sourceLineNo">371</span>   }<a name="line.371"></a>
-<span class="sourceLineNo">372</span><a name="line.372"></a>
-<span class="sourceLineNo">373</span><a name="line.373"></a>
-<span class="sourceLineNo">374</span>   //--------------------------------------------------------------------------------<a name="line.374"></a>
-<span class="sourceLineNo">375</span>   // Entry point methods<a name="line.375"></a>
-<span class="sourceLineNo">376</span>   //--------------------------------------------------------------------------------<a name="line.376"></a>
-<span class="sourceLineNo">377</span><a name="line.377"></a>
-<span class="sourceLineNo">378</span>   @Override /* Serializer */<a name="line.378"></a>
-<span class="sourceLineNo">379</span>   public UonSerializerSession createSession(Object output, ObjectMap op, Method javaMethod, Locale locale, TimeZone timeZone, MediaType mediaType, UriContext uriContext) {<a name="line.379"></a>
-<span class="sourceLineNo">380</span>      return new UonSerializerSession(ctx, null, op, output, javaMethod, locale, timeZone, mediaType, uriContext);<a name="line.380"></a>
-<span class="sourceLineNo">381</span>   }<a name="line.381"></a>
-<span class="sourceLineNo">382</span><a name="line.382"></a>
-<span class="sourceLineNo">383</span>   @Override /* Serializer */<a name="line.383"></a>
-<span class="sourceLineNo">384</span>   protected void doSerialize(SerializerSession session, Object o) throws Exception {<a name="line.384"></a>
-<span class="sourceLineNo">385</span>      UonSerializerSession s = (UonSerializerSession)session;<a name="line.385"></a>
-<span class="sourceLineNo">386</span>      serializeAnything(s, s.getWriter(), o, s.getExpectedRootType(o), "root", null, false);<a name="line.386"></a>
-<span class="sourceLineNo">387</span>   }<a name="line.387"></a>
-<span class="sourceLineNo">388</span>}<a name="line.388"></a>
+<span class="sourceLineNo">353</span>   @SuppressWarnings({ "rawtypes", "unchecked" })<a name="line.353"></a>
+<span class="sourceLineNo">354</span>   private SerializerWriter serializeCollection(UonSerializerSession session, UonWriter out, Collection c, ClassMeta&lt;?&gt; type) throws Exception {<a name="line.354"></a>
+<span class="sourceLineNo">355</span><a name="line.355"></a>
+<span class="sourceLineNo">356</span>      ClassMeta&lt;?&gt; elementType = type.getElementType();<a name="line.356"></a>
+<span class="sourceLineNo">357</span><a name="line.357"></a>
+<span class="sourceLineNo">358</span>      c = session.sort(c);<a name="line.358"></a>
+<span class="sourceLineNo">359</span><a name="line.359"></a>
+<span class="sourceLineNo">360</span>      if (! session.isPlainTextParams())<a name="line.360"></a>
+<span class="sourceLineNo">361</span>         out.append('@').append('(');<a name="line.361"></a>
+<span class="sourceLineNo">362</span><a name="line.362"></a>
+<span class="sourceLineNo">363</span>      int depth = session.getIndent();<a name="line.363"></a>
+<span class="sourceLineNo">364</span><a name="line.364"></a>
+<span class="sourceLineNo">365</span>      for (Iterator i = c.iterator(); i.hasNext();) {<a name="line.365"></a>
+<span class="sourceLineNo">366</span>         out.cr(depth);<a name="line.366"></a>
+<span class="sourceLineNo">367</span>         serializeAnything(session, out, i.next(), elementType, "&lt;iterator&gt;", null);<a name="line.367"></a>
+<span class="sourceLineNo">368</span>         if (i.hasNext())<a name="line.368"></a>
+<span class="sourceLineNo">369</span>            out.append(',');<a name="line.369"></a>
+<span class="sourceLineNo">370</span>      }<a name="line.370"></a>
+<span class="sourceLineNo">371</span><a name="line.371"></a>
+<span class="sourceLineNo">372</span>      if (c.size() &gt; 0)<a name="line.372"></a>
+<span class="sourceLineNo">373</span>         out.cr(depth-1);<a name="line.373"></a>
+<span class="sourceLineNo">374</span>      if (! session.isPlainTextParams())<a name="line.374"></a>
+<span class="sourceLineNo">375</span>         out.append(')');<a name="line.375"></a>
+<span class="sourceLineNo">376</span><a name="line.376"></a>
+<span class="sourceLineNo">377</span>      return out;<a name="line.377"></a>
+<span class="sourceLineNo">378</span>   }<a name="line.378"></a>
+<span class="sourceLineNo">379</span><a name="line.379"></a>
+<span class="sourceLineNo">380</span><a name="line.380"></a>
+<span class="sourceLineNo">381</span>   //--------------------------------------------------------------------------------<a name="line.381"></a>
+<span class="sourceLineNo">382</span>   // Entry point methods<a name="line.382"></a>
+<span class="sourceLineNo">383</span>   //--------------------------------------------------------------------------------<a name="line.383"></a>
+<span class="sourceLineNo">384</span><a name="line.384"></a>
+<span class="sourceLineNo">385</span>   @Override /* Serializer */<a name="line.385"></a>
+<span class="sourceLineNo">386</span>   public UonSerializerSession createSession(Object output, ObjectMap op, Method javaMethod, Locale locale, TimeZone timeZone, MediaType mediaType, UriContext uriContext) {<a name="line.386"></a>
+<span class="sourceLineNo">387</span>      return new UonSerializerSession(ctx, null, op, output, javaMethod, locale, timeZone, mediaType, uriContext);<a name="line.387"></a>
+<span class="sourceLineNo">388</span>   }<a name="line.388"></a>
+<span class="sourceLineNo">389</span><a name="line.389"></a>
+<span class="sourceLineNo">390</span>   @Override /* Serializer */<a name="line.390"></a>
+<span class="sourceLineNo">391</span>   protected void doSerialize(SerializerSession session, Object o) throws Exception {<a name="line.391"></a>
+<span class="sourceLineNo">392</span>      UonSerializerSession s = (UonSerializerSession)session;<a name="line.392"></a>
+<span class="sourceLineNo">393</span>      serializeAnything(s, s.getWriter(), o, s.getExpectedRootType(o), "root", null);<a name="line.393"></a>
+<span class="sourceLineNo">394</span>   }<a name="line.394"></a>
+<span class="sourceLineNo">395</span>}<a name="line.395"></a>
 
 
 

http://git-wip-us.apache.org/repos/asf/incubator-juneau-website/blob/19e9b7df/content/site/apidocs/src-html/org/apache/juneau/uon/UonSerializer.Readable.html
----------------------------------------------------------------------
diff --git a/content/site/apidocs/src-html/org/apache/juneau/uon/UonSerializer.Readable.html b/content/site/apidocs/src-html/org/apache/juneau/uon/UonSerializer.Readable.html
index 925d438..a90bf34 100644
--- a/content/site/apidocs/src-html/org/apache/juneau/uon/UonSerializer.Readable.html
+++ b/content/site/apidocs/src-html/org/apache/juneau/uon/UonSerializer.Readable.html
@@ -212,188 +212,195 @@
 <span class="sourceLineNo">204</span>    * @param eType The expected type of the object if this is a bean property.<a name="line.204"></a>
 <span class="sourceLineNo">205</span>    * @param attrName The bean property name if this is a bean property.  &lt;jk&gt;null&lt;/jk&gt; if this isn't a bean property being serialized.<a name="line.205"></a>
 <span class="sourceLineNo">206</span>    * @param pMeta The bean property metadata.<a name="line.206"></a>
-<span class="sourceLineNo">207</span>    * @param plainTextParams &lt;jk&gt;true&lt;/jk&gt; if this is a top level parameter key or value and paramFormat is PLAINTEXT.<a name="line.207"></a>
-<span class="sourceLineNo">208</span>    *<a name="line.208"></a>
-<span class="sourceLineNo">209</span>    * @return The same writer passed in.<a name="line.209"></a>
-<span class="sourceLineNo">210</span>    * @throws Exception<a name="line.210"></a>
-<span class="sourceLineNo">211</span>    */<a name="line.211"></a>
-<span class="sourceLineNo">212</span>   @SuppressWarnings({ "rawtypes", "unchecked" })<a name="line.212"></a>
-<span class="sourceLineNo">213</span>   protected SerializerWriter serializeAnything(UonSerializerSession session, UonWriter out, Object o, ClassMeta&lt;?&gt; eType,<a name="line.213"></a>
-<span class="sourceLineNo">214</span>         String attrName, BeanPropertyMeta pMeta, boolean plainTextParams) throws Exception {<a name="line.214"></a>
-<span class="sourceLineNo">215</span><a name="line.215"></a>
-<span class="sourceLineNo">216</span>      if (o == null) {<a name="line.216"></a>
-<span class="sourceLineNo">217</span>         out.appendObject(null, false, plainTextParams);<a name="line.217"></a>
-<span class="sourceLineNo">218</span>         return out;<a name="line.218"></a>
-<span class="sourceLineNo">219</span>      }<a name="line.219"></a>
-<span class="sourceLineNo">220</span><a name="line.220"></a>
-<span class="sourceLineNo">221</span>      if (eType == null)<a name="line.221"></a>
-<span class="sourceLineNo">222</span>         eType = object();<a name="line.222"></a>
-<span class="sourceLineNo">223</span><a name="line.223"></a>
-<span class="sourceLineNo">224</span>      ClassMeta&lt;?&gt; aType;        // The actual type<a name="line.224"></a>
-<span class="sourceLineNo">225</span>      ClassMeta&lt;?&gt; sType;        // The serialized type<a name="line.225"></a>
-<span class="sourceLineNo">226</span><a name="line.226"></a>
-<span class="sourceLineNo">227</span>      aType = session.push(attrName, o, eType);<a name="line.227"></a>
-<span class="sourceLineNo">228</span>      boolean isRecursion = aType == null;<a name="line.228"></a>
-<span class="sourceLineNo">229</span><a name="line.229"></a>
-<span class="sourceLineNo">230</span>      // Handle recursion<a name="line.230"></a>
-<span class="sourceLineNo">231</span>      if (aType == null) {<a name="line.231"></a>
-<span class="sourceLineNo">232</span>         o = null;<a name="line.232"></a>
-<span class="sourceLineNo">233</span>         aType = object();<a name="line.233"></a>
-<span class="sourceLineNo">234</span>      }<a name="line.234"></a>
-<span class="sourceLineNo">235</span><a name="line.235"></a>
-<span class="sourceLineNo">236</span>      sType = aType.getSerializedClassMeta();<a name="line.236"></a>
-<span class="sourceLineNo">237</span>      String typeName = session.getBeanTypeName(eType, aType, pMeta);<a name="line.237"></a>
-<span class="sourceLineNo">238</span><a name="line.238"></a>
-<span class="sourceLineNo">239</span>      // Swap if necessary<a name="line.239"></a>
-<span class="sourceLineNo">240</span>      PojoSwap swap = aType.getPojoSwap();<a name="line.240"></a>
-<span class="sourceLineNo">241</span>      if (swap != null) {<a name="line.241"></a>
-<span class="sourceLineNo">242</span>         o = swap.swap(session, o);<a name="line.242"></a>
-<span class="sourceLineNo">243</span><a name="line.243"></a>
-<span class="sourceLineNo">244</span>         // If the getSwapClass() method returns Object, we need to figure out<a name="line.244"></a>
-<span class="sourceLineNo">245</span>         // the actual type now.<a name="line.245"></a>
-<span class="sourceLineNo">246</span>         if (sType.isObject())<a name="line.246"></a>
-<span class="sourceLineNo">247</span>            sType = session.getClassMetaForObject(o);<a name="line.247"></a>
-<span class="sourceLineNo">248</span>      }<a name="line.248"></a>
-<span class="sourceLineNo">249</span><a name="line.249"></a>
-<span class="sourceLineNo">250</span>      // '\0' characters are considered null.<a name="line.250"></a>
-<span class="sourceLineNo">251</span>      if (o == null || (sType.isChar() &amp;&amp; ((Character)o).charValue() == 0))<a name="line.251"></a>
-<span class="sourceLineNo">252</span>         out.appendObject(null, false, plainTextParams);<a name="line.252"></a>
-<span class="sourceLineNo">253</span>      else if (sType.isBoolean())<a name="line.253"></a>
-<span class="sourceLineNo">254</span>         out.appendBoolean(o);<a name="line.254"></a>
-<span class="sourceLineNo">255</span>      else if (sType.isNumber())<a name="line.255"></a>
-<span class="sourceLineNo">256</span>         out.appendNumber(o);<a name="line.256"></a>
-<span class="sourceLineNo">257</span>      else if (sType.isBean())<a name="line.257"></a>
-<span class="sourceLineNo">258</span>         serializeBeanMap(session, out, session.toBeanMap(o), typeName);<a name="line.258"></a>
-<span class="sourceLineNo">259</span>      else if (sType.isUri() || (pMeta != null &amp;&amp; pMeta.isUri()))<a name="line.259"></a>
-<span class="sourceLineNo">260</span>         out.appendUri(o);<a name="line.260"></a>
-<span class="sourceLineNo">261</span>      else if (sType.isMap()) {<a name="line.261"></a>
-<span class="sourceLineNo">262</span>         if (o instanceof BeanMap)<a name="line.262"></a>
-<span class="sourceLineNo">263</span>            serializeBeanMap(session, out, (BeanMap)o, typeName);<a name="line.263"></a>
-<span class="sourceLineNo">264</span>         else<a name="line.264"></a>
-<span class="sourceLineNo">265</span>            serializeMap(session, out, (Map)o, eType);<a name="line.265"></a>
-<span class="sourceLineNo">266</span>      }<a name="line.266"></a>
-<span class="sourceLineNo">267</span>      else if (sType.isCollection()) {<a name="line.267"></a>
-<span class="sourceLineNo">268</span>         serializeCollection(session, out, (Collection) o, eType);<a name="line.268"></a>
-<span class="sourceLineNo">269</span>      }<a name="line.269"></a>
-<span class="sourceLineNo">270</span>      else if (sType.isArray()) {<a name="line.270"></a>
-<span class="sourceLineNo">271</span>         serializeCollection(session, out, toList(sType.getInnerClass(), o), eType);<a name="line.271"></a>
-<span class="sourceLineNo">272</span>      }<a name="line.272"></a>
-<span class="sourceLineNo">273</span>      else {<a name="line.273"></a>
-<span class="sourceLineNo">274</span>         out.appendObject(o, false, plainTextParams);<a name="line.274"></a>
-<span class="sourceLineNo">275</span>      }<a name="line.275"></a>
-<span class="sourceLineNo">276</span><a name="line.276"></a>
-<span class="sourceLineNo">277</span>      if (! isRecursion)<a name="line.277"></a>
-<span class="sourceLineNo">278</span>         session.pop();<a name="line.278"></a>
-<span class="sourceLineNo">279</span>      return out;<a name="line.279"></a>
-<span class="sourceLineNo">280</span>   }<a name="line.280"></a>
-<span class="sourceLineNo">281</span><a name="line.281"></a>
-<span class="sourceLineNo">282</span>   @SuppressWarnings({ "rawtypes", "unchecked" })<a name="line.282"></a>
-<span class="sourceLineNo">283</span>   private SerializerWriter serializeMap(UonSerializerSession session, UonWriter out, Map m, ClassMeta&lt;?&gt; type) throws Exception {<a name="line.283"></a>
-<span class="sourceLineNo">284</span><a name="line.284"></a>
-<span class="sourceLineNo">285</span>      m = session.sort(m);<a name="line.285"></a>
-<span class="sourceLineNo">286</span><a name="line.286"></a>
-<span class="sourceLineNo">287</span>      ClassMeta&lt;?&gt; keyType = type.getKeyType(), valueType = type.getValueType();<a name="line.287"></a>
-<span class="sourceLineNo">288</span><a name="line.288"></a>
-<span class="sourceLineNo">289</span>      int depth = session.getIndent();<a name="line.289"></a>
-<span class="sourceLineNo">290</span>      out.append('(');<a name="line.290"></a>
-<span class="sourceLineNo">291</span><a name="line.291"></a>
-<span class="sourceLineNo">292</span>      Iterator mapEntries = m.entrySet().iterator();<a name="line.292"></a>
-<span class="sourceLineNo">293</span><a name="line.293"></a>
-<span class="sourceLineNo">294</span>      while (mapEntries.hasNext()) {<a name="line.294"></a>
-<span class="sourceLineNo">295</span>         Map.Entry e = (Map.Entry) mapEntries.next();<a name="line.295"></a>
-<span class="sourceLineNo">296</span>         Object value = e.getValue();<a name="line.296"></a>
-<span class="sourceLineNo">297</span>         Object key = session.generalize(e.getKey(), keyType);<a name="line.297"></a>
-<span class="sourceLineNo">298</span>         out.cr(depth).appendObject(key, false, false).append('=');<a name="line.298"></a>
-<span class="sourceLineNo">299</span>         serializeAnything(session, out, value, valueType, (key == null ? null : session.toString(key)), null, false);<a name="line.299"></a>
-<span class="sourceLineNo">300</span>         if (mapEntries.hasNext())<a name="line.300"></a>
-<span class="sourceLineNo">301</span>            out.append(',');<a name="line.301"></a>
-<span class="sourceLineNo">302</span>      }<a name="line.302"></a>
-<span class="sourceLineNo">303</span><a name="line.303"></a>
-<span class="sourceLineNo">304</span>      if (m.size() &gt; 0)<a name="line.304"></a>
-<span class="sourceLineNo">305</span>         out.cr(depth-1);<a name="line.305"></a>
-<span class="sourceLineNo">306</span>      out.append(')');<a name="line.306"></a>
+<span class="sourceLineNo">207</span>    *<a name="line.207"></a>
+<span class="sourceLineNo">208</span>    * @return The same writer passed in.<a name="line.208"></a>
+<span class="sourceLineNo">209</span>    * @throws Exception<a name="line.209"></a>
+<span class="sourceLineNo">210</span>    */<a name="line.210"></a>
+<span class="sourceLineNo">211</span>   @SuppressWarnings({ "rawtypes", "unchecked" })<a name="line.211"></a>
+<span class="sourceLineNo">212</span>   protected SerializerWriter serializeAnything(UonSerializerSession session, UonWriter out, Object o, ClassMeta&lt;?&gt; eType,<a name="line.212"></a>
+<span class="sourceLineNo">213</span>         String attrName, BeanPropertyMeta pMeta) throws Exception {<a name="line.213"></a>
+<span class="sourceLineNo">214</span><a name="line.214"></a>
+<span class="sourceLineNo">215</span>      if (o == null) {<a name="line.215"></a>
+<span class="sourceLineNo">216</span>         out.appendObject(null, false);<a name="line.216"></a>
+<span class="sourceLineNo">217</span>         return out;<a name="line.217"></a>
+<span class="sourceLineNo">218</span>      }<a name="line.218"></a>
+<span class="sourceLineNo">219</span><a name="line.219"></a>
+<span class="sourceLineNo">220</span>      if (eType == null)<a name="line.220"></a>
+<span class="sourceLineNo">221</span>         eType = object();<a name="line.221"></a>
+<span class="sourceLineNo">222</span><a name="line.222"></a>
+<span class="sourceLineNo">223</span>      ClassMeta&lt;?&gt; aType;        // The actual type<a name="line.223"></a>
+<span class="sourceLineNo">224</span>      ClassMeta&lt;?&gt; sType;        // The serialized type<a name="line.224"></a>
+<span class="sourceLineNo">225</span><a name="line.225"></a>
+<span class="sourceLineNo">226</span>      aType = session.push(attrName, o, eType);<a name="line.226"></a>
+<span class="sourceLineNo">227</span>      boolean isRecursion = aType == null;<a name="line.227"></a>
+<span class="sourceLineNo">228</span><a name="line.228"></a>
+<span class="sourceLineNo">229</span>      // Handle recursion<a name="line.229"></a>
+<span class="sourceLineNo">230</span>      if (aType == null) {<a name="line.230"></a>
+<span class="sourceLineNo">231</span>         o = null;<a name="line.231"></a>
+<span class="sourceLineNo">232</span>         aType = object();<a name="line.232"></a>
+<span class="sourceLineNo">233</span>      }<a name="line.233"></a>
+<span class="sourceLineNo">234</span><a name="line.234"></a>
+<span class="sourceLineNo">235</span>      sType = aType.getSerializedClassMeta();<a name="line.235"></a>
+<span class="sourceLineNo">236</span>      String typeName = session.getBeanTypeName(eType, aType, pMeta);<a name="line.236"></a>
+<span class="sourceLineNo">237</span><a name="line.237"></a>
+<span class="sourceLineNo">238</span>      // Swap if necessary<a name="line.238"></a>
+<span class="sourceLineNo">239</span>      PojoSwap swap = aType.getPojoSwap();<a name="line.239"></a>
+<span class="sourceLineNo">240</span>      if (swap != null) {<a name="line.240"></a>
+<span class="sourceLineNo">241</span>         o = swap.swap(session, o);<a name="line.241"></a>
+<span class="sourceLineNo">242</span><a name="line.242"></a>
+<span class="sourceLineNo">243</span>         // If the getSwapClass() method returns Object, we need to figure out<a name="line.243"></a>
+<span class="sourceLineNo">244</span>         // the actual type now.<a name="line.244"></a>
+<span class="sourceLineNo">245</span>         if (sType.isObject())<a name="line.245"></a>
+<span class="sourceLineNo">246</span>            sType = session.getClassMetaForObject(o);<a name="line.246"></a>
+<span class="sourceLineNo">247</span>      }<a name="line.247"></a>
+<span class="sourceLineNo">248</span><a name="line.248"></a>
+<span class="sourceLineNo">249</span>      // '\0' characters are considered null.<a name="line.249"></a>
+<span class="sourceLineNo">250</span>      if (o == null || (sType.isChar() &amp;&amp; ((Character)o).charValue() == 0))<a name="line.250"></a>
+<span class="sourceLineNo">251</span>         out.appendObject(null, false);<a name="line.251"></a>
+<span class="sourceLineNo">252</span>      else if (sType.isBoolean())<a name="line.252"></a>
+<span class="sourceLineNo">253</span>         out.appendBoolean(o);<a name="line.253"></a>
+<span class="sourceLineNo">254</span>      else if (sType.isNumber())<a name="line.254"></a>
+<span class="sourceLineNo">255</span>         out.appendNumber(o);<a name="line.255"></a>
+<span class="sourceLineNo">256</span>      else if (sType.isBean())<a name="line.256"></a>
+<span class="sourceLineNo">257</span>         serializeBeanMap(session, out, session.toBeanMap(o), typeName);<a name="line.257"></a>
+<span class="sourceLineNo">258</span>      else if (sType.isUri() || (pMeta != null &amp;&amp; pMeta.isUri()))<a name="line.258"></a>
+<span class="sourceLineNo">259</span>         out.appendUri(o);<a name="line.259"></a>
+<span class="sourceLineNo">260</span>      else if (sType.isMap()) {<a name="line.260"></a>
+<span class="sourceLineNo">261</span>         if (o instanceof BeanMap)<a name="line.261"></a>
+<span class="sourceLineNo">262</span>            serializeBeanMap(session, out, (BeanMap)o, typeName);<a name="line.262"></a>
+<span class="sourceLineNo">263</span>         else<a name="line.263"></a>
+<span class="sourceLineNo">264</span>            serializeMap(session, out, (Map)o, eType);<a name="line.264"></a>
+<span class="sourceLineNo">265</span>      }<a name="line.265"></a>
+<span class="sourceLineNo">266</span>      else if (sType.isCollection()) {<a name="line.266"></a>
+<span class="sourceLineNo">267</span>         serializeCollection(session, out, (Collection) o, eType);<a name="line.267"></a>
+<span class="sourceLineNo">268</span>      }<a name="line.268"></a>
+<span class="sourceLineNo">269</span>      else if (sType.isArray()) {<a name="line.269"></a>
+<span class="sourceLineNo">270</span>         serializeCollection(session, out, toList(sType.getInnerClass(), o), eType);<a name="line.270"></a>
+<span class="sourceLineNo">271</span>      }<a name="line.271"></a>
+<span class="sourceLineNo">272</span>      else {<a name="line.272"></a>
+<span class="sourceLineNo">273</span>         out.appendObject(o, false);<a name="line.273"></a>
+<span class="sourceLineNo">274</span>      }<a name="line.274"></a>
+<span class="sourceLineNo">275</span><a name="line.275"></a>
+<span class="sourceLineNo">276</span>      if (! isRecursion)<a name="line.276"></a>
+<span class="sourceLineNo">277</span>         session.pop();<a name="line.277"></a>
+<span class="sourceLineNo">278</span>      return out;<a name="line.278"></a>
+<span class="sourceLineNo">279</span>   }<a name="line.279"></a>
+<span class="sourceLineNo">280</span><a name="line.280"></a>
+<span class="sourceLineNo">281</span>   @SuppressWarnings({ "rawtypes", "unchecked" })<a name="line.281"></a>
+<span class="sourceLineNo">282</span>   private SerializerWriter serializeMap(UonSerializerSession session, UonWriter out, Map m, ClassMeta&lt;?&gt; type) throws Exception {<a name="line.282"></a>
+<span class="sourceLineNo">283</span><a name="line.283"></a>
+<span class="sourceLineNo">284</span>      m = session.sort(m);<a name="line.284"></a>
+<span class="sourceLineNo">285</span><a name="line.285"></a>
+<span class="sourceLineNo">286</span>      ClassMeta&lt;?&gt; keyType = type.getKeyType(), valueType = type.getValueType();<a name="line.286"></a>
+<span class="sourceLineNo">287</span><a name="line.287"></a>
+<span class="sourceLineNo">288</span>      int depth = session.getIndent();<a name="line.288"></a>
+<span class="sourceLineNo">289</span><a name="line.289"></a>
+<span class="sourceLineNo">290</span>      if (! session.isPlainTextParams())<a name="line.290"></a>
+<span class="sourceLineNo">291</span>         out.append('(');<a name="line.291"></a>
+<span class="sourceLineNo">292</span><a name="line.292"></a>
+<span class="sourceLineNo">293</span>      Iterator mapEntries = m.entrySet().iterator();<a name="line.293"></a>
+<span class="sourceLineNo">294</span><a name="line.294"></a>
+<span class="sourceLineNo">295</span>      while (mapEntries.hasNext()) {<a name="line.295"></a>
+<span class="sourceLineNo">296</span>         Map.Entry e = (Map.Entry) mapEntries.next();<a name="line.296"></a>
+<span class="sourceLineNo">297</span>         Object value = e.getValue();<a name="line.297"></a>
+<span class="sourceLineNo">298</span>         Object key = session.generalize(e.getKey(), keyType);<a name="line.298"></a>
+<span class="sourceLineNo">299</span>         out.cr(depth).appendObject(key, false).append('=');<a name="line.299"></a>
+<span class="sourceLineNo">300</span>         serializeAnything(session, out, value, valueType, (key == null ? null : session.toString(key)), null);<a name="line.300"></a>
+<span class="sourceLineNo">301</span>         if (mapEntries.hasNext())<a name="line.301"></a>
+<span class="sourceLineNo">302</span>            out.append(',');<a name="line.302"></a>
+<span class="sourceLineNo">303</span>      }<a name="line.303"></a>
+<span class="sourceLineNo">304</span><a name="line.304"></a>
+<span class="sourceLineNo">305</span>      if (m.size() &gt; 0)<a name="line.305"></a>
+<span class="sourceLineNo">306</span>         out.cr(depth-1);<a name="line.306"></a>
 <span class="sourceLineNo">307</span><a name="line.307"></a>
-<span class="sourceLineNo">308</span>      return out;<a name="line.308"></a>
-<span class="sourceLineNo">309</span>   }<a name="line.309"></a>
+<span class="sourceLineNo">308</span>      if (! session.isPlainTextParams())<a name="line.308"></a>
+<span class="sourceLineNo">309</span>         out.append(')');<a name="line.309"></a>
 <span class="sourceLineNo">310</span><a name="line.310"></a>
-<span class="sourceLineNo">311</span>   private SerializerWriter serializeBeanMap(UonSerializerSession session, UonWriter out, BeanMap&lt;?&gt; m, String typeName) throws Exception {<a name="line.311"></a>
-<span class="sourceLineNo">312</span>      int depth = session.getIndent();<a name="line.312"></a>
+<span class="sourceLineNo">311</span>      return out;<a name="line.311"></a>
+<span class="sourceLineNo">312</span>   }<a name="line.312"></a>
 <span class="sourceLineNo">313</span><a name="line.313"></a>
-<span class="sourceLineNo">314</span>      out.append('(');<a name="line.314"></a>
-<span class="sourceLineNo">315</span><a name="line.315"></a>
-<span class="sourceLineNo">316</span>      boolean addComma = false;<a name="line.316"></a>
-<span class="sourceLineNo">317</span><a name="line.317"></a>
-<span class="sourceLineNo">318</span>      for (BeanPropertyValue p : m.getValues(session.isTrimNulls(), typeName != null ? session.createBeanTypeNameProperty(m, typeName) : null)) {<a name="line.318"></a>
-<span class="sourceLineNo">319</span>         BeanPropertyMeta pMeta = p.getMeta();<a name="line.319"></a>
-<span class="sourceLineNo">320</span>         ClassMeta&lt;?&gt; cMeta = p.getClassMeta();<a name="line.320"></a>
+<span class="sourceLineNo">314</span>   private SerializerWriter serializeBeanMap(UonSerializerSession session, UonWriter out, BeanMap&lt;?&gt; m, String typeName) throws Exception {<a name="line.314"></a>
+<span class="sourceLineNo">315</span>      int depth = session.getIndent();<a name="line.315"></a>
+<span class="sourceLineNo">316</span><a name="line.316"></a>
+<span class="sourceLineNo">317</span>      if (! session.isPlainTextParams())<a name="line.317"></a>
+<span class="sourceLineNo">318</span>         out.append('(');<a name="line.318"></a>
+<span class="sourceLineNo">319</span><a name="line.319"></a>
+<span class="sourceLineNo">320</span>      boolean addComma = false;<a name="line.320"></a>
 <span class="sourceLineNo">321</span><a name="line.321"></a>
-<span class="sourceLineNo">322</span>         String key = p.getName();<a name="line.322"></a>
-<span class="sourceLineNo">323</span>         Object value = p.getValue();<a name="line.323"></a>
-<span class="sourceLineNo">324</span>         Throwable t = p.getThrown();<a name="line.324"></a>
-<span class="sourceLineNo">325</span>         if (t != null)<a name="line.325"></a>
-<span class="sourceLineNo">326</span>            session.addBeanGetterWarning(pMeta, t);<a name="line.326"></a>
-<span class="sourceLineNo">327</span><a name="line.327"></a>
-<span class="sourceLineNo">328</span>         if (session.canIgnoreValue(cMeta, key, value))<a name="line.328"></a>
-<span class="sourceLineNo">329</span>            continue;<a name="line.329"></a>
-<span class="sourceLineNo">330</span><a name="line.330"></a>
-<span class="sourceLineNo">331</span>         if (addComma)<a name="line.331"></a>
-<span class="sourceLineNo">332</span>            out.append(',');<a name="line.332"></a>
-<span class="sourceLineNo">333</span><a name="line.333"></a>
-<span class="sourceLineNo">334</span>         out.cr(depth).appendObject(key, false, false).append('=');<a name="line.334"></a>
-<span class="sourceLineNo">335</span><a name="line.335"></a>
-<span class="sourceLineNo">336</span>         serializeAnything(session, out, value, cMeta, key, pMeta, false);<a name="line.336"></a>
+<span class="sourceLineNo">322</span>      for (BeanPropertyValue p : m.getValues(session.isTrimNulls(), typeName != null ? session.createBeanTypeNameProperty(m, typeName) : null)) {<a name="line.322"></a>
+<span class="sourceLineNo">323</span>         BeanPropertyMeta pMeta = p.getMeta();<a name="line.323"></a>
+<span class="sourceLineNo">324</span>         ClassMeta&lt;?&gt; cMeta = p.getClassMeta();<a name="line.324"></a>
+<span class="sourceLineNo">325</span><a name="line.325"></a>
+<span class="sourceLineNo">326</span>         String key = p.getName();<a name="line.326"></a>
+<span class="sourceLineNo">327</span>         Object value = p.getValue();<a name="line.327"></a>
+<span class="sourceLineNo">328</span>         Throwable t = p.getThrown();<a name="line.328"></a>
+<span class="sourceLineNo">329</span>         if (t != null)<a name="line.329"></a>
+<span class="sourceLineNo">330</span>            session.addBeanGetterWarning(pMeta, t);<a name="line.330"></a>
+<span class="sourceLineNo">331</span><a name="line.331"></a>
+<span class="sourceLineNo">332</span>         if (session.canIgnoreValue(cMeta, key, value))<a name="line.332"></a>
+<span class="sourceLineNo">333</span>            continue;<a name="line.333"></a>
+<span class="sourceLineNo">334</span><a name="line.334"></a>
+<span class="sourceLineNo">335</span>         if (addComma)<a name="line.335"></a>
+<span class="sourceLineNo">336</span>            out.append(',');<a name="line.336"></a>
 <span class="sourceLineNo">337</span><a name="line.337"></a>
-<span class="sourceLineNo">338</span>         addComma = true;<a name="line.338"></a>
-<span class="sourceLineNo">339</span>      }<a name="line.339"></a>
-<span class="sourceLineNo">340</span><a name="line.340"></a>
-<span class="sourceLineNo">341</span>      if (m.size() &gt; 0)<a name="line.341"></a>
-<span class="sourceLineNo">342</span>         out.cr(depth-1);<a name="line.342"></a>
-<span class="sourceLineNo">343</span>      out.append(')');<a name="line.343"></a>
+<span class="sourceLineNo">338</span>         out.cr(depth).appendObject(key, false).append('=');<a name="line.338"></a>
+<span class="sourceLineNo">339</span><a name="line.339"></a>
+<span class="sourceLineNo">340</span>         serializeAnything(session, out, value, cMeta, key, pMeta);<a name="line.340"></a>
+<span class="sourceLineNo">341</span><a name="line.341"></a>
+<span class="sourceLineNo">342</span>         addComma = true;<a name="line.342"></a>
+<span class="sourceLineNo">343</span>      }<a name="line.343"></a>
 <span class="sourceLineNo">344</span><a name="line.344"></a>
-<span class="sourceLineNo">345</span>      return out;<a name="line.345"></a>
-<span class="sourceLineNo">346</span>   }<a name="line.346"></a>
-<span class="sourceLineNo">347</span><a name="line.347"></a>
-<span class="sourceLineNo">348</span>   @SuppressWarnings({ "rawtypes", "unchecked" })<a name="line.348"></a>
-<span class="sourceLineNo">349</span>   private SerializerWriter serializeCollection(UonSerializerSession session, UonWriter out, Collection c, ClassMeta&lt;?&gt; type) throws Exception {<a name="line.349"></a>
-<span class="sourceLineNo">350</span><a name="line.350"></a>
-<span class="sourceLineNo">351</span>      ClassMeta&lt;?&gt; elementType = type.getElementType();<a name="line.351"></a>
+<span class="sourceLineNo">345</span>      if (m.size() &gt; 0)<a name="line.345"></a>
+<span class="sourceLineNo">346</span>         out.cr(depth-1);<a name="line.346"></a>
+<span class="sourceLineNo">347</span>      if (! session.isPlainTextParams())<a name="line.347"></a>
+<span class="sourceLineNo">348</span>         out.append(')');<a name="line.348"></a>
+<span class="sourceLineNo">349</span><a name="line.349"></a>
+<span class="sourceLineNo">350</span>      return out;<a name="line.350"></a>
+<span class="sourceLineNo">351</span>   }<a name="line.351"></a>
 <span class="sourceLineNo">352</span><a name="line.352"></a>
-<span class="sourceLineNo">353</span>      c = session.sort(c);<a name="line.353"></a>
-<span class="sourceLineNo">354</span><a name="line.354"></a>
-<span class="sourceLineNo">355</span>      out.append('@').append('(');<a name="line.355"></a>
-<span class="sourceLineNo">356</span><a name="line.356"></a>
-<span class="sourceLineNo">357</span>      int depth = session.getIndent();<a name="line.357"></a>
-<span class="sourceLineNo">358</span><a name="line.358"></a>
-<span class="sourceLineNo">359</span>      for (Iterator i = c.iterator(); i.hasNext();) {<a name="line.359"></a>
-<span class="sourceLineNo">360</span>         out.cr(depth);<a name="line.360"></a>
-<span class="sourceLineNo">361</span>         serializeAnything(session, out, i.next(), elementType, "&lt;iterator&gt;", null, false);<a name="line.361"></a>
-<span class="sourceLineNo">362</span>         if (i.hasNext())<a name="line.362"></a>
-<span class="sourceLineNo">363</span>            out.append(',');<a name="line.363"></a>
-<span class="sourceLineNo">364</span>      }<a name="line.364"></a>
-<span class="sourceLineNo">365</span><a name="line.365"></a>
-<span class="sourceLineNo">366</span>      if (c.size() &gt; 0)<a name="line.366"></a>
-<span class="sourceLineNo">367</span>         out.cr(depth-1);<a name="line.367"></a>
-<span class="sourceLineNo">368</span>      out.append(')');<a name="line.368"></a>
-<span class="sourceLineNo">369</span><a name="line.369"></a>
-<span class="sourceLineNo">370</span>      return out;<a name="line.370"></a>
-<span class="sourceLineNo">371</span>   }<a name="line.371"></a>
-<span class="sourceLineNo">372</span><a name="line.372"></a>
-<span class="sourceLineNo">373</span><a name="line.373"></a>
-<span class="sourceLineNo">374</span>   //--------------------------------------------------------------------------------<a name="line.374"></a>
-<span class="sourceLineNo">375</span>   // Entry point methods<a name="line.375"></a>
-<span class="sourceLineNo">376</span>   //--------------------------------------------------------------------------------<a name="line.376"></a>
-<span class="sourceLineNo">377</span><a name="line.377"></a>
-<span class="sourceLineNo">378</span>   @Override /* Serializer */<a name="line.378"></a>
-<span class="sourceLineNo">379</span>   public UonSerializerSession createSession(Object output, ObjectMap op, Method javaMethod, Locale locale, TimeZone timeZone, MediaType mediaType, UriContext uriContext) {<a name="line.379"></a>
-<span class="sourceLineNo">380</span>      return new UonSerializerSession(ctx, null, op, output, javaMethod, locale, timeZone, mediaType, uriContext);<a name="line.380"></a>
-<span class="sourceLineNo">381</span>   }<a name="line.381"></a>
-<span class="sourceLineNo">382</span><a name="line.382"></a>
-<span class="sourceLineNo">383</span>   @Override /* Serializer */<a name="line.383"></a>
-<span class="sourceLineNo">384</span>   protected void doSerialize(SerializerSession session, Object o) throws Exception {<a name="line.384"></a>
-<span class="sourceLineNo">385</span>      UonSerializerSession s = (UonSerializerSession)session;<a name="line.385"></a>
-<span class="sourceLineNo">386</span>      serializeAnything(s, s.getWriter(), o, s.getExpectedRootType(o), "root", null, false);<a name="line.386"></a>
-<span class="sourceLineNo">387</span>   }<a name="line.387"></a>
-<span class="sourceLineNo">388</span>}<a name="line.388"></a>
+<span class="sourceLineNo">353</span>   @SuppressWarnings({ "rawtypes", "unchecked" })<a name="line.353"></a>
+<span class="sourceLineNo">354</span>   private SerializerWriter serializeCollection(UonSerializerSession session, UonWriter out, Collection c, ClassMeta&lt;?&gt; type) throws Exception {<a name="line.354"></a>
+<span class="sourceLineNo">355</span><a name="line.355"></a>
+<span class="sourceLineNo">356</span>      ClassMeta&lt;?&gt; elementType = type.getElementType();<a name="line.356"></a>
+<span class="sourceLineNo">357</span><a name="line.357"></a>
+<span class="sourceLineNo">358</span>      c = session.sort(c);<a name="line.358"></a>
+<span class="sourceLineNo">359</span><a name="line.359"></a>
+<span class="sourceLineNo">360</span>      if (! session.isPlainTextParams())<a name="line.360"></a>
+<span class="sourceLineNo">361</span>         out.append('@').append('(');<a name="line.361"></a>
+<span class="sourceLineNo">362</span><a name="line.362"></a>
+<span class="sourceLineNo">363</span>      int depth = session.getIndent();<a name="line.363"></a>
+<span class="sourceLineNo">364</span><a name="line.364"></a>
+<span class="sourceLineNo">365</span>      for (Iterator i = c.iterator(); i.hasNext();) {<a name="line.365"></a>
+<span class="sourceLineNo">366</span>         out.cr(depth);<a name="line.366"></a>
+<span class="sourceLineNo">367</span>         serializeAnything(session, out, i.next(), elementType, "&lt;iterator&gt;", null);<a name="line.367"></a>
+<span class="sourceLineNo">368</span>         if (i.hasNext())<a name="line.368"></a>
+<span class="sourceLineNo">369</span>            out.append(',');<a name="line.369"></a>
+<span class="sourceLineNo">370</span>      }<a name="line.370"></a>
+<span class="sourceLineNo">371</span><a name="line.371"></a>
+<span class="sourceLineNo">372</span>      if (c.size() &gt; 0)<a name="line.372"></a>
+<span class="sourceLineNo">373</span>         out.cr(depth-1);<a name="line.373"></a>
+<span class="sourceLineNo">374</span>      if (! session.isPlainTextParams())<a name="line.374"></a>
+<span class="sourceLineNo">375</span>         out.append(')');<a name="line.375"></a>
+<span class="sourceLineNo">376</span><a name="line.376"></a>
+<span class="sourceLineNo">377</span>      return out;<a name="line.377"></a>
+<span class="sourceLineNo">378</span>   }<a name="line.378"></a>
+<span class="sourceLineNo">379</span><a name="line.379"></a>
+<span class="sourceLineNo">380</span><a name="line.380"></a>
+<span class="sourceLineNo">381</span>   //--------------------------------------------------------------------------------<a name="line.381"></a>
+<span class="sourceLineNo">382</span>   // Entry point methods<a name="line.382"></a>
+<span class="sourceLineNo">383</span>   //--------------------------------------------------------------------------------<a name="line.383"></a>
+<span class="sourceLineNo">384</span><a name="line.384"></a>
+<span class="sourceLineNo">385</span>   @Override /* Serializer */<a name="line.385"></a>
+<span class="sourceLineNo">386</span>   public UonSerializerSession createSession(Object output, ObjectMap op, Method javaMethod, Locale locale, TimeZone timeZone, MediaType mediaType, UriContext uriContext) {<a name="line.386"></a>
+<span class="sourceLineNo">387</span>      return new UonSerializerSession(ctx, null, op, output, javaMethod, locale, timeZone, mediaType, uriContext);<a name="line.387"></a>
+<span class="sourceLineNo">388</span>   }<a name="line.388"></a>
+<span class="sourceLineNo">389</span><a name="line.389"></a>
+<span class="sourceLineNo">390</span>   @Override /* Serializer */<a name="line.390"></a>
+<span class="sourceLineNo">391</span>   protected void doSerialize(SerializerSession session, Object o) throws Exception {<a name="line.391"></a>
+<span class="sourceLineNo">392</span>      UonSerializerSession s = (UonSerializerSession)session;<a name="line.392"></a>
+<span class="sourceLineNo">393</span>      serializeAnything(s, s.getWriter(), o, s.getExpectedRootType(o), "root", null);<a name="line.393"></a>
+<span class="sourceLineNo">394</span>   }<a name="line.394"></a>
+<span class="sourceLineNo">395</span>}<a name="line.395"></a>
 
 
 


Mime
View raw message