No errors in the application but this is how the response looks like

"parent": {
    "id": 1,
    "children": [
      {
        "id": 1
      },
      {
        "id": 2
      }
    ]
  }

There is no children with id: 1, the DB fetch is good the data gets manipulated after it leaves Spring Boot Rest Controller (Assuming somewhere during Jackson Deserialization), But only the Id field is getting duplicated (Or getting copied as Parent id).

This happens to only one such child object and only Id field, other objects are good.

1

There are 1 best solutions below

0
On BEST ANSWER

I have found the issue. The issue isn't related to Jackson / Spring.

The issue comes from javascript, I have crossed the MAX_SAFE_INTEGER in javascript, hence when the raw response gets converted into Json this strange behaviour is observed.

I have noticed that it only happens to the first child, in list of child hence I find it very very strange.