We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Let us consider this code
import ( "fmt" "github.com/herkyl/patchwerk" ) func main() { a := `{"L1": ["A", "B","C"]}` b := `{"L1": ["C", "A","B"]}` patch, err := patchwerk.DiffBytes([]byte(a), []byte(b)) if err != nil { fmt.Println(err) return } fmt.Println(string(patch)) }
Output: [{"op":"add","path":"/L1/0","value":"C"}]'
But the actual output of the patch should be [{remove /L1/2 } {add /L1/0 C}] Where C at index 2 is removed and C is added at index 0
The text was updated successfully, but these errors were encountered:
No branches or pull requests
Let us consider this code
Output:
[{"op":"add","path":"/L1/0","value":"C"}]'
But the actual output of the patch should be
[{remove /L1/2 } {add /L1/0 C}]
Where C at index 2 is removed and C is added at index 0
The text was updated successfully, but these errors were encountered: