flipkart-incubator / flipkart-incubator/zjsonpatch

1.0 <> 1

Open
#20 5 comments 0 reactions 0 assignees View on GitHub
Dominant language
Java
Stars
586
Forks
153
PR merge metrics
No merged PRs in 30d

Description

If I compare the following 2 fragments:

expected:

```
{
"value" : 1.0
}
```

test data:

```
{
"value" : 1
}
```

zjsonpatch considers this different and generates a As far as I am aware, in JavaScript/JSON there is no distinction between integers and floats/doubles: they are all considered 'numbers'.

zjsonpatch should not generate a "replace" patch node for this.

Contributor guide

Open the contributing guide

Research direction

The issue gives the expected and test JSON values but names no source file or test. Start by locating the JSON comparison and numeric equality entry points, then inspect existing tests for number comparisons. Done means equivalent integer and floating-point JSON numbers no longer produce a replace patch, while genuinely different numbers still do.

Written by the indexing model from the issue text.

Assessment

Tech stack
java
Domain
backend
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.