Carlos Chacin

Youtube Channel: @cchacin

Software Engineering Experiences


💾 Java Records 💿 with Jackson 2.12

Posted at March 04, 2021 /

java-records-jackson

In the previous article about Java 14 Records, we saw how to start creating Records to avoid writing much boilerplate code that the compiler would generate for us.

Now the next steps are to see how we can serialize records to JSON and deserialize JSON to records to be able to use them as a request/response representation for microservices.

In this case, we would use the Jackson 2.12+.

Read more ...

🌒 JakartaEE JSON-B 🐝 Retrofit2 Converter

Posted at September 23, 2020 /

java-records-jsonb

Retrofit is pluggable allowing different serialization formats and their libraries to be used for converting Java types to their HTTP representation and parsing HTTP entities back into Java types.

These are called converters, and Retrofit includes a few first-party modules for popular frameworks

Just for fun, I created a Retrofit2 Converter.Factory for JakartaEE Json-B.

Read more ...

🔌 Restore IntelliJ Idea settings ⛽

Posted at April 30, 2020 /

intellij-restore-settings

After a long day trying to figure out how to reset all my IntelliJ settings, I decided to write this to document the obvious solution that was not that obvious to me.

I was using the 🔥 JetBrains Toolbox App 🔥 for a while to manage my IntelliJ Idea Ultimate installation along with other tools like Rider, WebStorm, and the Early Access Preview for IntelliJ Community Edition.

toolboxapp

After several installations and reinstallations of IDEs and different Java/JDK versions (8, 9, 11, 14), the IDE was not able to import my maven projects. The IntelliJ IDEA was acting as a simple text editor at this time 😟.

Read more ...

💾 Java 14 Records 🐞 with JakartaEE JSON-B

Posted at April 20, 2020 /

java-records-jsonb

In the previous article about Java 14 Records, we saw how to start creating Records to avoid writing much boilerplate code that the compiler would generate for us.

Now the next steps are to see how we can serialize records to JSON and deserialize JSON to records to be able to use them as a request/response representation for microservices.

In this case, we would use the JSON-B specification used by JakartaEE and MicroProfile implementations like GlashFish, TomEE, Wildfly, OpenLiberty, and Quarkus.

Read more ...

🚀 Java 14 Records 💾 (Preview)

Posted at April 17, 2020 /

java-records

Record is a new kind of type declaration in the Java language. Like an enum, a record is a restricted form of class. It declares its representation and commits to an API that matches that representation. Records give up a freedom that classes usually enjoy: the ability to decouple API from representation. In return, records gain a significant degree of concision.

A record has a name and a state description. The state description declares the components of the record. Optionally, a record has a body. For example:

record Point(int x, int y) { }
Read more ...