{"id":2449,"date":"2025-12-23T10:00:18","date_gmt":"2025-12-23T15:00:18","guid":{"rendered":"http:\/\/www.mymiller.name\/wordpress\/?p=2449"},"modified":"2025-12-23T10:00:18","modified_gmt":"2025-12-23T15:00:18","slug":"jackson-configuration","status":"publish","type":"post","link":"https:\/\/www.mymiller.name\/wordpress\/java\/jackson-configuration\/","title":{"rendered":"Jackson Configuration"},"content":{"rendered":"\n<p>Jackson, one of my favorite tools to use for Java POJO to\/from&nbsp;JSON, has a number of configuration settings.&nbsp; Today I am going to discuss a few of these settings and why I recommend the ones that I do.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Serialization Features<\/h2>\n\n\n\n<p>Serialization is the conversion of Java POJO&#8217;s to JSON.&nbsp; These feature control, how that conversion is handled.&nbsp;&nbsp;<\/p>\n\n\n\n<h3 class=\"wp-block-heading\"><br>SerializationFeature.WRITE_NULL_MAP_VALUES<\/h3>\n\n\n\n<p>If you are passing your JSON over the network, then I recommend setting this value to <strong>FALSE<\/strong>.&nbsp; However, if you are not sending your JSON over the network, then I would leave this feature as <strong>TRUE<\/strong>.<\/p>\n\n\n\n<p>Disabling this will save you bytes in the data transfer.&nbsp; While the bytes used for the name of the field, may not be many, consider when it&#8217;s part of an array, multiple that out.&nbsp; Over time it can be a significant number of bytes that can be saved.<\/p>\n\n\n\n<p>Start with this setting on from the beginning and develop your application with this setting.&nbsp; This will ensure all of your code supports this.&nbsp; Trying to enable this in the middle of development can mean a considerable chunk of time making modifications to support missing fields.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">SerializationFeature.WRITE_DATES_AS_TIMESTAMPS<\/h3>\n\n\n\n<p>Set this to <strong>FALSE <\/strong>to allow dates to be passed as <g class=\"gr_ gr_8 gr-alert gr_gramm gr_inline_cards gr_disable_anim_appear Grammar only-ins doubleReplace replaceWithoutSep\" id=\"8\" data-gr-id=\"8\">human<\/g>-readable string.&nbsp; This will greatly improve debugging processes.&nbsp; However, if this data is going across in a data transfer, it is costing you bytes.&nbsp; For development have this set to FALSE, for production, change this back to <strong>TRUE<\/strong>, and reduce the data transfer size.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">SerializationFeature.<br>WRITE_ENUMS_USING_INDEX<\/h3>\n\n\n\n<p>This is a development decision, and the role your ENUMs are going to play.&nbsp; If the text of your enum is what you need then set this to <strong>FALSE<\/strong>.&nbsp; However, if bytes count, set this to <strong>TRUE<\/strong>, as an ordinal number will be smaller in bytes than the textual representation.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\"><br>Deserialization Features<\/h2>\n\n\n\n<p>Deserialization is the conversion of JSON to POJO&#8217;s.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">DeserializationFeature.FAIL_ON_UNKNOWN_PROPERTIES<\/h2>\n\n\n\n<p>Always a good one to set to <strong>FALSE<\/strong>.&nbsp; Prevent Jackson from throwing an exception if an additional field is found in the JSON.&nbsp;This way the JSON can be updated and ready to make use of a new field prior to POJO if necessary.&nbsp; This will help encapsulate your work allowing for things to be added in slowly.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Jackson configuration for JSON to POJO conversion.  Standard conversion for converting JSON to POJO objects for Rest APIs and other implementations.<\/p>\n","protected":false},"author":1,"featured_media":2745,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_coblocks_attr":"","_coblocks_dimensions":"","_coblocks_responsive_height":"","_coblocks_accordion_ie_support":"","jetpack_post_was_ever_published":false,"_jetpack_newsletter_access":"","_jetpack_dont_email_post_to_subs":false,"_jetpack_newsletter_tier_id":0,"_jetpack_memberships_contains_paywalled_content":false,"_jetpack_memberships_contains_paid_content":false,"footnotes":"","jetpack_publicize_message":"","jetpack_publicize_feature_enabled":true,"jetpack_social_post_already_shared":true,"jetpack_social_options":{"image_generator_settings":{"template":"highway","default_image_id":0,"font":"","enabled":false},"version":2}},"categories":[280],"tags":[],"series":[],"class_list":["post-2449","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-java"],"jetpack_publicize_connections":[],"jetpack_featured_media_url":"https:\/\/i0.wp.com\/www.mymiller.name\/wordpress\/wp-content\/uploads\/2019\/05\/analytics-3088958_640.jpg?fit=640%2C426&ssl=1","jetpack-related-posts":[{"id":3718,"url":"https:\/\/www.mymiller.name\/wordpress\/springboot\/deep-dive-into-springs-message-conversion-custom-message-converters-and-their-role-in-serialization-deserialization\/","url_meta":{"origin":2449,"position":0},"title":"Deep Dive into Spring&#8217;s Message Conversion: Custom Message Converters and Their Role in Serialization\/Deserialization","author":"Jeffery Miller","date":"November 24, 2025","format":false,"excerpt":"When working with Spring applications, particularly those that deal with messaging, REST APIs, or data interchange, understanding message conversion is crucial. Spring provides a powerful framework for handling serialization and deserialization through its message converters. In this article, we will explore the concept of custom message converters, how they fit\u2026","rel":"","context":"In &quot;Springboot&quot;","block_context":{"text":"Springboot","link":"https:\/\/www.mymiller.name\/wordpress\/category\/springboot\/"},"img":{"alt_text":"","src":"https:\/\/www.mymiller.name\/wordpress\/wp-content\/uploads\/2024\/09\/transformation-3753443_1280-jpg.avif","width":350,"height":200,"srcset":"https:\/\/www.mymiller.name\/wordpress\/wp-content\/uploads\/2024\/09\/transformation-3753443_1280-jpg.avif 1x, https:\/\/www.mymiller.name\/wordpress\/wp-content\/uploads\/2024\/09\/transformation-3753443_1280-jpg.avif 1.5x, https:\/\/www.mymiller.name\/wordpress\/wp-content\/uploads\/2024\/09\/transformation-3753443_1280-jpg.avif 2x, https:\/\/www.mymiller.name\/wordpress\/wp-content\/uploads\/2024\/09\/transformation-3753443_1280-jpg.avif 3x"},"classes":[]},{"id":3890,"url":"https:\/\/www.mymiller.name\/wordpress\/spring_messaging\/spring-cloud-stream\/","url_meta":{"origin":2449,"position":1},"title":"Spring Cloud Stream","author":"Jeffery Miller","date":"December 24, 2025","format":false,"excerpt":"Spring Cloud Stream is a framework for building highly scalable, event-driven microservices that are connected by a shared messaging system. In simple terms, it's a powerful tool that takes away the complexity of communicating with message brokers like RabbitMQ or Apache Kafka, allowing you to focus purely on your application's\u2026","rel":"","context":"In &quot;Spring Messaging&quot;","block_context":{"text":"Spring Messaging","link":"https:\/\/www.mymiller.name\/wordpress\/category\/spring_messaging\/"},"img":{"alt_text":"","src":"https:\/\/i0.wp.com\/www.mymiller.name\/wordpress\/wp-content\/uploads\/2023\/11\/network-3152677_640.jpg?fit=640%2C427&ssl=1&resize=350%2C200","width":350,"height":200,"srcset":"https:\/\/i0.wp.com\/www.mymiller.name\/wordpress\/wp-content\/uploads\/2023\/11\/network-3152677_640.jpg?fit=640%2C427&ssl=1&resize=350%2C200 1x, https:\/\/i0.wp.com\/www.mymiller.name\/wordpress\/wp-content\/uploads\/2023\/11\/network-3152677_640.jpg?fit=640%2C427&ssl=1&resize=525%2C300 1.5x"},"classes":[]},{"id":3421,"url":"https:\/\/www.mymiller.name\/wordpress\/java_extra\/convert-csv-to-json-and-json-to-csv-with-csvjsonconverter\/","url_meta":{"origin":2449,"position":2},"title":"Convert CSV to JSON and JSON to CSV with CSVJSONConverter","author":"Jeffery Miller","date":"December 24, 2025","format":false,"excerpt":"In today's data-driven world, it's common to work with different data formats like CSV (Comma-Separated Values) and JSON (JavaScript Object Notation). Converting data between these formats is a common task in data processing and integration workflows. In this article, we'll explore how to use the CSVJSONConverter class, a versatile utility\u2026","rel":"","context":"In &quot;Java Extras&quot;","block_context":{"text":"Java Extras","link":"https:\/\/www.mymiller.name\/wordpress\/category\/java_extra\/"},"img":{"alt_text":"","src":"https:\/\/i0.wp.com\/www.mymiller.name\/wordpress\/wp-content\/uploads\/2023\/07\/computer-g610baba23_640.jpg?fit=640%2C360&ssl=1&resize=350%2C200","width":350,"height":200,"srcset":"https:\/\/i0.wp.com\/www.mymiller.name\/wordpress\/wp-content\/uploads\/2023\/07\/computer-g610baba23_640.jpg?fit=640%2C360&ssl=1&resize=350%2C200 1x, https:\/\/i0.wp.com\/www.mymiller.name\/wordpress\/wp-content\/uploads\/2023\/07\/computer-g610baba23_640.jpg?fit=640%2C360&ssl=1&resize=525%2C300 1.5x"},"classes":[]},{"id":3475,"url":"https:\/\/www.mymiller.name\/wordpress\/spring_sockets\/spring-boot-with-rsocket\/","url_meta":{"origin":2449,"position":3},"title":"Spring Boot with RSocket","author":"Jeffery Miller","date":"December 24, 2025","format":false,"excerpt":"RSocket, a powerful messaging protocol, is a perfect fit for building reactive microservices in a Spring Boot environment. This article will guide you through integrating RSocket with Spring Boot using both Maven and Gradle build systems. We'll explore adding the necessary dependencies, configuration options, and basic usage examples. Getting Started:\u2026","rel":"","context":"In &quot;Spring Sockets&quot;","block_context":{"text":"Spring Sockets","link":"https:\/\/www.mymiller.name\/wordpress\/category\/spring_sockets\/"},"img":{"alt_text":"","src":"https:\/\/i0.wp.com\/www.mymiller.name\/wordpress\/wp-content\/uploads\/2024\/03\/technology-3374916_640.jpg?fit=640%2C261&ssl=1&resize=350%2C200","width":350,"height":200,"srcset":"https:\/\/i0.wp.com\/www.mymiller.name\/wordpress\/wp-content\/uploads\/2024\/03\/technology-3374916_640.jpg?fit=640%2C261&ssl=1&resize=350%2C200 1x, https:\/\/i0.wp.com\/www.mymiller.name\/wordpress\/wp-content\/uploads\/2024\/03\/technology-3374916_640.jpg?fit=640%2C261&ssl=1&resize=525%2C300 1.5x"},"classes":[]},{"id":3179,"url":"https:\/\/www.mymiller.name\/wordpress\/java_extra\/understanding-json-data-processing-with-java-exploring-the-jsonfieldprocessor-class\/","url_meta":{"origin":2449,"position":4},"title":"Understanding JSON Data Processing with Java: Exploring the JsonFieldProcessor Class","author":"Jeffery Miller","date":"January 15, 2026","format":false,"excerpt":"In today's digital era, data comes in various formats, with JSON (JavaScript Object Notation) being one of the most popular for representing structured data. Manipulating and processing JSON data efficiently is crucial for many software applications, from web development to data analysis. In this article, we'll delve into the workings\u2026","rel":"","context":"In &quot;Java Extras&quot;","block_context":{"text":"Java Extras","link":"https:\/\/www.mymiller.name\/wordpress\/category\/java_extra\/"},"img":{"alt_text":"","src":"https:\/\/i0.wp.com\/www.mymiller.name\/wordpress\/wp-content\/uploads\/2024\/04\/data-7798787_640.png?fit=640%2C640&ssl=1&resize=350%2C200","width":350,"height":200,"srcset":"https:\/\/i0.wp.com\/www.mymiller.name\/wordpress\/wp-content\/uploads\/2024\/04\/data-7798787_640.png?fit=640%2C640&ssl=1&resize=350%2C200 1x, https:\/\/i0.wp.com\/www.mymiller.name\/wordpress\/wp-content\/uploads\/2024\/04\/data-7798787_640.png?fit=640%2C640&ssl=1&resize=525%2C300 1.5x"},"classes":[]},{"id":3185,"url":"https:\/\/www.mymiller.name\/wordpress\/java_tips\/java-tips-part-3\/","url_meta":{"origin":2449,"position":5},"title":"Java Tips Part 3","author":"Jeffery Miller","date":"December 24, 2025","format":false,"excerpt":"Continuing my Java Tips from experience that I have learned from code reviews to different programming tasks. Tip 11: Use Hibernate Statistics Now, this is only for your development profiles\/environments, not for production. Hibernate has built-in statistics on your queries. This will break down how much time is spent along\u2026","rel":"","context":"In &quot;Java Tips&quot;","block_context":{"text":"Java Tips","link":"https:\/\/www.mymiller.name\/wordpress\/category\/java_tips\/"},"img":{"alt_text":"","src":"https:\/\/i0.wp.com\/www.mymiller.name\/wordpress\/wp-content\/uploads\/2021\/12\/sam-dan-truong-rF4kuvgHhU-unsplash-scaled-e1640791434235.jpg?fit=640%2C427&ssl=1&resize=350%2C200","width":350,"height":200,"srcset":"https:\/\/i0.wp.com\/www.mymiller.name\/wordpress\/wp-content\/uploads\/2021\/12\/sam-dan-truong-rF4kuvgHhU-unsplash-scaled-e1640791434235.jpg?fit=640%2C427&ssl=1&resize=350%2C200 1x, https:\/\/i0.wp.com\/www.mymiller.name\/wordpress\/wp-content\/uploads\/2021\/12\/sam-dan-truong-rF4kuvgHhU-unsplash-scaled-e1640791434235.jpg?fit=640%2C427&ssl=1&resize=525%2C300 1.5x"},"classes":[]}],"jetpack_sharing_enabled":true,"jetpack_likes_enabled":true,"_links":{"self":[{"href":"https:\/\/www.mymiller.name\/wordpress\/wp-json\/wp\/v2\/posts\/2449","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.mymiller.name\/wordpress\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.mymiller.name\/wordpress\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.mymiller.name\/wordpress\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.mymiller.name\/wordpress\/wp-json\/wp\/v2\/comments?post=2449"}],"version-history":[{"count":5,"href":"https:\/\/www.mymiller.name\/wordpress\/wp-json\/wp\/v2\/posts\/2449\/revisions"}],"predecessor-version":[{"id":2747,"href":"https:\/\/www.mymiller.name\/wordpress\/wp-json\/wp\/v2\/posts\/2449\/revisions\/2747"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.mymiller.name\/wordpress\/wp-json\/wp\/v2\/media\/2745"}],"wp:attachment":[{"href":"https:\/\/www.mymiller.name\/wordpress\/wp-json\/wp\/v2\/media?parent=2449"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.mymiller.name\/wordpress\/wp-json\/wp\/v2\/categories?post=2449"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.mymiller.name\/wordpress\/wp-json\/wp\/v2\/tags?post=2449"},{"taxonomy":"series","embeddable":true,"href":"https:\/\/www.mymiller.name\/wordpress\/wp-json\/wp\/v2\/series?post=2449"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}