Closed np closed 2 years ago
These commits add a -f flag to specify the format for the patch. The current format is named native and JSON is supported using -f=json.
-f
native
-f=json
While encoding patches works, decoding them does not work yet.
Here is the error, I'm getting:
json: cannot unmarshal string into Go struct field DiffElement.old of type jd.JsonNode
With this patch:
[{"path":["foo"],"old":["bar"],"new":["baz"]}]
Potentially we could tell the unmarshaller to call NewJsonNode.
NewJsonNode
The -f flag is there now and supports three formats, “jd” “merge” and “patch”.
These commits add a
-f
flag to specify the format for the patch. The current format is namednative
and JSON is supported using-f=json
.While encoding patches works, decoding them does not work yet.
Here is the error, I'm getting:
With this patch:
Potentially we could tell the unmarshaller to call
NewJsonNode
.