<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Jackson &#8211; My Shitty Code</title>
	<atom:link href="https://myshittycode.com/tag/jackson/feed/" rel="self" type="application/rss+xml" />
	<link>https://myshittycode.com</link>
	<description>Embracing the Messiness in Search of Epic Solutions</description>
	<lastBuildDate>Fri, 06 Jan 2023 16:45:07 +0000</lastBuildDate>
	<language>en-US</language>
	<sy:updatePeriod>
	hourly	</sy:updatePeriod>
	<sy:updateFrequency>
	1	</sy:updateFrequency>
	<generator>https://wordpress.org/?v=7.0.1</generator>

<image>
	<url>https://myshittycode.com/wp-content/uploads/2022/04/cropped-icon-32x32.png</url>
	<title>Jackson &#8211; My Shitty Code</title>
	<link>https://myshittycode.com</link>
	<width>32</width>
	<height>32</height>
</image> 
<site xmlns="com-wordpress:feed-additions:1">205304208</site>	<item>
		<title>Jackson 2.x: JSON Serialization Difference for Map.Entry between 2.4.x vs 2.5.x</title>
		<link>https://myshittycode.com/2015/03/28/jackson-2-x-json-serialization-difference-for-map-entry-between-2-4-x-vs-2-5-x/</link>
					<comments>https://myshittycode.com/2015/03/28/jackson-2-x-json-serialization-difference-for-map-entry-between-2-4-x-vs-2-5-x/#respond</comments>
		
		<dc:creator><![CDATA[Shitty Author]]></dc:creator>
		<pubDate>Sun, 29 Mar 2015 00:38:18 +0000</pubDate>
				<category><![CDATA[Programming Language]]></category>
		<category><![CDATA[Jackson]]></category>
		<category><![CDATA[Java]]></category>
		<category><![CDATA[JSON]]></category>
		<guid isPermaLink="false">http://myshittycode.com/?p=686</guid>

					<description><![CDATA[<p>It appears Jackson 2.4.5 and 2.5.1 behave a little differently when handling Map.Entry. Let&#8217;s assume we have the following bean:- We have a simple Spring MVC rest controller that creates this bean and returns the JSON data back to the client:- Jackson 2.4.5 generates the following JSON:- Jackson 2.5.1 generates the following JSON:-</p>
<p>The post <a rel="nofollow" href="https://myshittycode.com/2015/03/28/jackson-2-x-json-serialization-difference-for-map-entry-between-2-4-x-vs-2-5-x/">Jackson 2.x: JSON Serialization Difference for Map.Entry between 2.4.x vs 2.5.x</a> appeared first on <a rel="nofollow" href="https://myshittycode.com">My Shitty Code</a>.</p>
]]></description>
										<content:encoded><![CDATA[
<p class="wp-block-paragraph">It appears Jackson 2.4.5 and 2.5.1 behave a little differently when handling <b>Map.Entry</b>.</p>



<p class="wp-block-paragraph">Let&#8217;s assume we have the following bean:-</p>


<div class="wp-block-syntaxhighlighter-code "><pre class="brush: java; title: ; notranslate">
public class MyBean {
    private Map.Entry&lt;String, String&gt; entry;

    public Map.Entry&lt;String, String&gt; getEntry() {
        return entry;
    }

    public void setEntry(Map.Entry&lt;String, String&gt; entry) {
        this.entry = entry;
    }
}
</pre></div>


<p class="wp-block-paragraph">We have a simple Spring MVC rest controller that creates this bean and returns the JSON data back to the client:-</p>


<div class="wp-block-syntaxhighlighter-code "><pre class="brush: java; title: ; notranslate">
@RequestMapping(value = &quot;/map&quot;, method = RequestMethod.GET)
public ResponseEntity map() {
    final MyBean myBean = new MyBean();
    myBean.setEntry(new AbstractMap.SimpleImmutableEntry&lt;String, String&gt;(&quot;a&quot;, &quot;1&quot;));

    return new ResponseEntity&lt;MyBean&gt;(myBean, HttpStatus.OK);
}
</pre></div>


<p class="wp-block-paragraph">Jackson 2.4.5 generates the following JSON:-</p>


<div class="wp-block-syntaxhighlighter-code "><pre class="brush: jscript; title: ; notranslate">
{
   &quot;entry&quot;:
   {
       &quot;key&quot;: &quot;a&quot;,
       &quot;value&quot;: &quot;1&quot;
   }
}
</pre></div>


<p class="wp-block-paragraph">Jackson 2.5.1 generates the following JSON:-</p>


<div class="wp-block-syntaxhighlighter-code "><pre class="brush: jscript; title: ; notranslate">
{
   &quot;entry&quot;:
   {
       &quot;a&quot;: &quot;1&quot;
   }
}
</pre></div><p>The post <a rel="nofollow" href="https://myshittycode.com/2015/03/28/jackson-2-x-json-serialization-difference-for-map-entry-between-2-4-x-vs-2-5-x/">Jackson 2.x: JSON Serialization Difference for Map.Entry between 2.4.x vs 2.5.x</a> appeared first on <a rel="nofollow" href="https://myshittycode.com">My Shitty Code</a>.</p>
]]></content:encoded>
					
					<wfw:commentRss>https://myshittycode.com/2015/03/28/jackson-2-x-json-serialization-difference-for-map-entry-between-2-4-x-vs-2-5-x/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
		<post-id xmlns="com-wordpress:feed-additions:1">686</post-id>	</item>
	</channel>
</rss>

<!--
Performance optimized by W3 Total Cache. Learn more: https://www.boldgrid.com/w3-total-cache/?utm_source=w3tc&utm_medium=footer_comment&utm_campaign=free_plugin

Page Caching using Disk: Enhanced 
Lazy Loading (feed)
Database Caching 49/64 queries in 0.042 seconds using Disk

Served from: myshittycode.com @ 2026-07-10 13:35:43 by W3 Total Cache
-->