Skip to content

JsonIdentityInfo for Map (not pojo) #5120

@zengkid

Description

@zengkid

Search before asking

  • 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

  1. Brief code sample/snippet: include here in preformatted/code section
  2. Longer example stored somewhere else (diff repo, snippet), add a link
  3. 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

Metadata

Metadata

Assignees

No one assigned

    Labels

    to-evaluateIssue that has been received but not yet evaluated

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions