Introducing “Jackformer”

(the Transformative Tool)

Background: what NEW have I OSS’d lately?

Background: time to Do Some Docker

Tool to Do What?

  1. Read pom.xml (XML content) into JsonNode (Jackson 2.12 made this work much better than before
  2. 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)
  3. Convert plain-old JSON into “binary” JSON variants like CBOR, MessagePack or Smile (and vice versa)

And then there was Jackformer

  1. Input format (with Jackson 2.x we could try using format auto-detection, but that only works for some of formats — and would lead to clunky flow)
  2. Output format (with some variations, for now wrt pretty-printing but may add variations for CSV)
  3. Input source (file upload or (for textual formats) text area)
  4. 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

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

Current Limitations

  • Avro and Protobuf require external schemas (or ones generated from POJOs)
  • 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!

--

--

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

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store
@cowtowncoder

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