Ok, so the assumption is that you have read my earlier post (Reading CSV with Jackson) — if not, it would probably make sense to do that first as I will be expanding on some of the aspects without repeating explanations.
But here’s a brief recap:
Jackson library allows use of all kinds of Java object types to represent JSON data to read and write: from
java.util.Collection s and arrays to “Plain Old Java Object” (POJOs, aka Beans), as well as most scalar JDK types (Strings, Numbers, Booleans, Date/Time values). …
Similar to my recent adventure into evaluating performance of String.format() for simple String concatenation, I found another potentially meaningful case of widely used (and useful) JDK-provided functionality that seems to significantly under-perform: decoding of
java.util.UUID from a String:
UUID uuid = UUID.fromString(request.getParameter("uuid"));
While the final Jackson 2.13.0 is not yet out — there are, however, two release candidates, 2.13.0-rc1 and 2.13.0-rc2 — it’s a good time to check out what will be included.
First things first: whereas Jackson 2.12 release was stock full of new features, 2.13 was planned to be a…
In the past I have found that the functionality in the JDK is usually well optimized, and performs reasonably well for the task, considering general nature and applicability of the functionality offered. …
Recently I came across a bit of code solving a relatively common problem — that of finding if a given
String contains one of specified characters.
This may be for input validation (refuse Strings that contains certain character(s)), or as a precondition to String modification (escaping / quoting), for example.
With Jackson 2.12, Jackson XML format module (
jackson-dataformat-xml) functionality improved a lot (see this earlier blog post). Specifically it became possible to actually use Jackson’s Tree Model (
JsonNode) for reading and writing XML.
By default you can read XML content like:
xmlMapper.readTree(xmlSource)) and get…
First things first: since some of you may not be familiar with the data format called Smile, here’s a brief introduction:
It has been a while since I wrote a new tool or library of any kind (excluding Jackson modules)
In fact, my last new Open Source library must be be “Gorp” from 2018 — a nifty (*) multi-regexp library, inspired by Elastic’s “grok” — but one that I haven’t developed much…
When serializing content as JSON (or another format Jackson supports), Jackson by default just writes out all property values as they are.
Many users want to change this behavior so that certain property values should be “filtered out”, not written as output. …