https://cloud.terminusdb.com/jsondiff
https://cloud.terminusdb.com/jsonpatch
WOQLClient
.Doc1
and Doc2
.getDiff
diff
pprint
(from pprint import pprint
)Doc1
.curl
.keep
which specifies a document describing which fields must be copied in the final object, and a copy_value
boolean flag, which specifies whether to specify the exact value in a copy operation.@before
/@after
instructions contain objects specified as tightly as required to obtain ids, or as ids.@before
/@after
designations, but potentially null
fields to describe missing elements.@before
/@after
with a list of those which exist only on the left, and only on the right.@copy
, @swap
and @keep
.From_Position
to To_Position
.Previous
to Next
. This can be used to extend, or drop elements as well as do full replacement."@patch"
. The patch must be less than or equal to the length of the list.ModifyTable
patch. The ModifyTable
patch is comprised of copies
, deletes
, inserts
and moves
.copies
give the sections of the table which can be copied verbatim. deletes
gives all segments which are to be removed from the original. inserts
gives all segments which are to be inserted into the new table.moves
specifies segments that are the same in both tables, but have moved location. This is particularly useful as moving rows and columns is a typical operation in a table (such as a CSV or Excel document).https://cloud.terminusdb.com/jsondiff
https://cloud.terminusdb.com/jsonpatch
"before"
and "after"
, pointing to the documents you would like to diff."before_data_version"
, "after"
and "document_id"
, specifying the data version or commit ID with which to compare the given after document."before_data_version"
, "after_data_version"
and "document_id"
specifying the data version or commit ID with which to compare the document given by "document_id"
"before_data_version"
, "after_data_version"
, meaning that we would like to get a diff for all documents between the two specified data versions.keep
: A dictionary which has keys which need to be copiedcopy_value
: Which specifies that we should make explicit which values existed during a list copy.