API Shortcuts - jsondata¶
jsondata.JSONData¶
JSONData¶
The class JSONData provides branch operations, which actually are logical set operations on structured subsets of attributes. This comprises basically two types of operations:
branch operations:
The unit of action is a complete branch, thus the branch is not intermixed with other attributes e.g. ‘branch_add’ or ‘branch_copy’.
attribute operations:
The unit of action is/are attributes, thus the branches are intermixed, or disjoined at the level of attributes e.g. ‘__add__’ and ‘__or__’, or ‘__xor__’.
The column [op-unit-scope] depicts the types and levels of provided operations:
- A: attribute
- B: branch
Methods¶
Basic:
[docs] [source] [op-unit-scope] [logic-operator] JSONData JSONData.__init__ __repr__ JSONData.__repr__ B,A repr __str__ JSONData.__str__ B,A str getData JSONData.getData getSchema JSONData.getSchema printData JSONData.printData A printSchema JSONData.printSchema setSchema JSONData.setSchema validate JSONData.validate B,A .
Branches and Trees:
[docs] [source] [op-unit-scope] [logic-operator] branch_add JSONData.branch_add B add branch_copy JSONData.branch_copy B cp branch_create JSONData.branch_create B new branch_move JSONData.branch_move B mv branch_remove JSONData.branch_remove B del branch_replace JSONData.branch_replace B replace branch_test JSONData.branch_test B test getTreeDiff JSONData.getTreeDiff B,A diff getPointerPath JSONData.getPointerPath B,A getCanonical JSONData.getCanonical B isApplicable JSONData.isApplicable B pop JSONData.pop pop
Operators¶
[docs] [source] [op-unit-scope] [logic-operator] __add__ JSONData.__add__ B,A + __and__ JSONData.__and__ B,A && __call__ JSONData.__call__ A exec __eq__ JSONData.__eq__ B,A == __getitem__ JSONData.__getitem__ B,A f(x) __iadd__ JSONData.__iadd__ B,A += __iand__ JSONData.__rand__ B,A &&= __imod__ JSONData.__imod__ B,A % __imul__ JSONData.__imul__ B,A * __ior__ JSONData.__ior__ B,A ||= __isub__ JSONData.__isub__ B,A - __ixor__ JSONData.__ixor__ B,A ^ __mod__ JSONData.__mod__ B,A % __mul__ JSONData.__mul__ B,A * __ne__ JSONData.__ne__ B,A != __or__ JSONData.__or__ B,A || __radd__ JSONData.__radd__ B,A S + x __rand__ JSONData.__rand__ B,A S && x __rmod__ JSONData.__rmod__ B,A % __rmul__ JSONData.__rmul__ B,A * __ror__ JSONData.__ror__ B,A S || x __rsub__ JSONData.__rsub__ B,A - __rxor__ JSONData.__rxor__ B,A ^ __sub__ JSONData.__sub__ B,A - __xor__ JSONData.__xor__ B,A ^
Iterators¶
[docs] [source] [op-unit-scope] [logic-operator] __iter__ JSONData.__iter__ B,A ->
jsondata.JSONDataSerializer¶
JSONDataSerializer¶
Methods¶
Basic
[docs] [source] JSONDataSerializer JSONDataSerializer.__init__ printData (1) JSONDataSerializer.printData printSchema (1) JSONDataSerializer.printSchema setSchema (1) JSONDataSerializer.setSchema Import/Export
[docs] [source] json_export JSONDataSerializer.json_export json_import JSONDataSerializer.json_import
jsondata.JSONPatch¶
JSONPatchItem¶
Methods¶
Basic
[docs] [source] [logic-operator] JSONPatchItem JSONPatchItem.__init__ __repr__ (2) JSONPatchItem.__repr__ repr __str__ (2) JSONPatchItem.__str__ str Basic
[docs] [source] [logic-operator] apply (2) JSONPatchItem.apply repr_export (2) JSONPatchItem.repr_export
Operators¶
[docs] [source] [logic-operator] __call__ (2) JSONPatchItem.__call__ exec __eq__ (2) JSONPatchItem.__eq__ == __getitem__ (2) JSONPatchItem.__getitem__ [i] __ne__ (2) JSONPatchItem.__ne__ !=
JSONPatchItemRaw¶
Methods¶
[docs] [source] JSONPatchItemRaw JSONPatchItemRaw.__init__
JSONPatchFilter¶
Methods¶
[docs] [source] [logic-operator] JSONPatchFilter JSONPatchFilter.__init__
Operators¶
[docs] [source] [logic-operator] __eq__ (4) JSONPatchFilter.__eq__ ==
JSONPatch¶
Methods¶
Basic
[docs] [source] [logic-operator] JSONPatch JSONPatch.__init__ __repr__ (5) JSONPatch.__repr__ repr __str__ (5) JSONPatch.__str__ str Patch
[docs] [source] [logic-operator] apply (5) JSONPatch.apply get (5) JSONPatch.get patch_export (5) JSONPatch.patch_export patch_import (5) JSONPatch.patch_import repr_export (5) JSONPatch.repr_export
Operators¶
[docs] [source] [logic-operator] __add__ (5) JSONPatch.__add__ + __call__ (5) JSONPatch.__call__ exec __eq__ (5) JSONPatch.__eq__ == __getitem__ (5) JSONPatch.__getitem__ [i] __iadd__ (5) JSONPatch.__iadd__ += __isub__ (5) JSONPatch.__isub__ -= __ne__ (5) JSONPatch.__ne__ != __sub__ (5) JSONPatch.__sub__ - __len__ (5) JSONPatch.__len__ len
Iterators¶
[docs] [source] [logic-operator] __iter__ (5) JSONPatch.__iter__ ->
jsondata.JSONPointer¶
JSONPointer¶
Methods¶
Basic:
[docs] [source] [logic-operator] JSONPointer JSONPointer.__init__ __repr__ (6) JSONPointer.__repr__ repr __str__ (6) JSONPointer.__str__ str Nodes:
Operators¶
[docs] [source] [logic-operator] __add__ (6) JSONPointer.__add__ + __call__ (6) JSONPointer.__call__ exec __eq__ (6) JSONPointer.__eq__ == __ge__ (6) JSONPointer.__ge__ >= __gt__ (6) JSONPointer.__gt__ > __iadd__ (6) JSONPointer.__iadd__ += __le__ (6) JSONPointer.__le__ <= __lt__ (6) JSONPointer.__lt__ < __ne__ (6) JSONPointer.__ne__ != __radd__ (6) JSONPointer.__radd__ x+
Iterators¶
[docs] [source] [logic-operator] iter_path JSONPointer.iter_path (path)-> iter_path_nodes JSONPointer.iter_path_nodes (path-nodes)->
jsondata.JSONTree¶
JSONTree¶
Methods¶
Basic
[docs] [source] [logic-operator] JSONTree JSONTree.__init__ Tree
[docs] [source] [logic-operator] printDiff JSONTree.printDiff fetchDiff JSONTree.fetchDiff diff
Runtime Test data¶
rfc6902¶
- jsondata.rfc6902.jsonp [json-pointer]
selftest¶
- jsondata.selftest.jsd [schema]
- jsondata.selftest.json [json]
- jsondata.selftest.jsonp [json-pointer]
jsondata.Selftest¶
Hard-coded selftests for the runtime system.