jackson-databind
jackson-databind copied to clipboard
JsonIdentityInfo for Map (not pojo)
Search before asking
- [x] I searched in the issues and found nothing similar.
Describe the bug
I know that @JsonIdentityInfo can resolve the recyle reference for pojo, but how about the Map object?
Version Information
No response
Reproduction
<-- Any of the following
- Brief code sample/snippet: include here in preformatted/code section
- Longer example stored somewhere else (diff repo, snippet), add a link
- Textual explanation: include here -->
// sample for map
Map category = new HashMap();
category.put("id", 1);
category.put("name", "category1");
Map product = new HashMap();
product.put("id", 1);
product.put("name", "product1");
product.put("price", "100");
product.put("category", category);
List<Map> products = new ArrayList<>();
products.add(product);
category.put("products", products);
//
Expected behavior
No response
Additional context
No response