Skip to content

POJO Mapping

Oscar Besga Arcauz edited this page Dec 3, 2022 · 2 revisions

As you can see, Redis stores all the data in UTF-8 Strings / arrays of bytes.

These utilities follow this path, and only allow String class to be used. But in Java we have POJO and classes, so we need some help to conver POJO -> String and viceversa. Also, we may want some specific representation of the POJO in the String , such as: JSON, CSV, YAML

Here Baeldung has some options to use CSV.

Also we can use Jackson or GSON to covert from/to JSON:
See Jackson vs GSON to see differences.

Also Jackson can serialize to JSON, CSV, TOML, YAML, etc..

There are more... TBD

Clone this wiki locally