<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:content="http://purl.org/rss/1.0/modules/content/">
  <channel>
    <title>Java on Siva Kalidasan</title>
    <link>https://mksiva.com/tags/java/</link>
    <description>Recent content in Java on Siva Kalidasan</description>
    <generator>Hugo</generator>
    <language>en-us</language>
    <lastBuildDate>Sat, 20 Jun 2026 00:00:00 +0000</lastBuildDate>
    <atom:link href="https://mksiva.com/tags/java/index.xml" rel="self" type="application/rss+xml" />
    <item>
      <title>Building a Simple CLI Tool with Picocli</title>
      <link>https://mksiva.com/tech/building-a-simple-cli-with-picocli/</link>
      <pubDate>Sat, 20 Jun 2026 00:00:00 +0000</pubDate>
      <guid>https://mksiva.com/tech/building-a-simple-cli-with-picocli/</guid>
      <description>&lt;p&gt;&lt;em&gt;Picocli is a small Java library that makes it easy to build command-line tools. You write plain Java classes, add a few annotations, and Picocli handles parsing, help text, and error messages for you.&lt;/em&gt;&lt;/p&gt;
&lt;h2 id=&#34;why-build-a-cli-tool&#34;&gt;Why build a CLI tool?&lt;/h2&gt;
&lt;p&gt;Many useful tools run in the terminal:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Build scripts&lt;/li&gt;
&lt;li&gt;Data migration utilities&lt;/li&gt;
&lt;li&gt;Dev helpers (rename files, check configs, seed databases)&lt;/li&gt;
&lt;li&gt;Internal admin tools&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;You &lt;em&gt;can&lt;/em&gt; parse &lt;code&gt;args&lt;/code&gt; manually with &lt;code&gt;String[] args&lt;/code&gt;, but that gets messy quickly when you need flags, subcommands, defaults, and &lt;code&gt;--help&lt;/code&gt;.&lt;/p&gt;</description>
    </item>
    <item>
      <title>Dealing with Java and JSON conversion</title>
      <link>https://mksiva.com/tech/dealing-with-java-and-json-conversion/</link>
      <pubDate>Fri, 23 Sep 2016 00:00:00 +0000</pubDate>
      <guid>https://mksiva.com/tech/dealing-with-java-and-json-conversion/</guid>
      <description>&lt;p&gt;When you are trying to convert any java object to json, you may run in to this problem.&lt;/p&gt;
&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;com.fasterxml.jackson.core.JsonGenerationException: Null key for a Map not allowed in JSON (use a converting NullKeySerializer?)
&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;This is due to null key in the map of objects (or collection of objects). JsonGenerator cannot serialize the null key into json.&lt;/p&gt;
&lt;h2 id=&#34;ignore-null-values-in-the-map&#34;&gt;Ignore &amp;rsquo;null&amp;rsquo; values in the map&lt;/h2&gt;
&lt;p&gt;So we can ignore &amp;rsquo;null&amp;rsquo; key and values from the ObjectMapper by using:&lt;/p&gt;</description>
    </item>
  </channel>
</rss>
