naming strategy
A Jackson setting that converts Java names into different JSON field names, for example itemCount into item_count.
In more detail
Java names use camel case, where each new word starts with a capital letter. Some APIs expect snake case, with words separated by underscores. Setting a naming strategy on the shared mapper changes every model at once, which is why it must be decided and tested deliberately.
Related terms
- ObjectMapper — Jackson's main class, which converts objects to JSON with writeValueAsString and JSON to typed objects with readValue, following its configured rules.
- wire format — The exact shape data takes when it travels between programs, such as the field names and types of a JSON body.
Taught in
- Working With Jackson — Modern Java: Virtual Threads & High-Throughput Services