Introducing “Jackformer”

(the Transformative Tool)

Background: what NEW have I OSS’d lately?

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 further (**).

Background: time to Do Some Docker

So towards end of 2020 I started thinking that I really needed to play more with some things with which I only had superficial familiarity (in their current forms), including Docker (and esp. docker builds) and the modern version of Spring Boot. The Thing — whatever it’d be — should do something useful, and might as well use some things that I have written before.
And finally, I should build something that is not (just) a library: for example, create an interactive service or tool of some kind. Something that can be directly used, not something that only works as embedded in something else.

Tool to Do What?

But the immediate question aside from “let’s build a tool” was “what should the tool do?”.

  1. Write JsonNode as, say, JSON, with pretty-printing. Or as Java Properties file if we are so inclined. Or maybe Avro or Protobuf document with suitable schema (which Jackson can generate, or use an existing external schema definition)
  2. Convert plain-old JSON into “binary” JSON variants like CBOR, MessagePack or Smile (and vice versa)

And then there was Jackformer

This simple idea lead to a simple (if not pretty (*)) web app that I dubbed “Jackformer” (it is a working title; could well change).

  1. Output format (with some variations, for now wrt pretty-printing but may add variations for CSV)
  2. Input source (file upload or (for textual formats) text area)
  3. Result target (file download or (for textual formats) output in text area)
Jackformer processing options
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<parent>
<groupId>com.fasterxml.jackson</groupId>
<artifactId>jackson-base</artifactId>
<version>2.12.3</version>
</parent>
<groupId>com.fasterxml.jackson.core</groupId>
<artifactId>jackson-core</artifactId>
<name>Jackson-core</name>
<version>2.12.3</version>
<packaging>bundle</packaging>
...
Jackformer conversion: XML to JSON

Running the Thing

As per Jackformer Github Repo at https://github.com/cowtowncoder/Jackformer — you can just clone the repository and run:

./mvnw clean spring-boot:run 
docker run -p 8080:8080 cowtowncoder/jackformer-webapp:latest 

Current Limitations

This first version (0.5.1-SNAPSHOT) supports conversions between 10 input data formats and 9 output formats: ones that require Schema information are missing, for example.

  • CSV input is accepted if (and only if) header row is used; output is not yet supported.
  • TOML is not listed yet but I should add it since Jackson 2.12.3 includes backend!

Feedback, contributions welcome!

At this point I don’t know if this thing is of use to others. It seems it might be but who knows? If you find it useful, check it out; let me know what you think.

Open Source developer, most known for Jackson data processor (nee “JSON library”), author of many, many other OSS libraries for Java, from ClassMate to Woodstox