| Trees | Indices | Help |
|
|---|
|
|
|
|||
|
|||
|
|||
|
|||
|
Inherited from |
|||
|
|||
|
Inherited from |
|||
|
|||
Create an object for the tree representation.
Args:
**kargs: Parameter specific for the operation,
scope:
* all: Display all diffs.
* first: Display first diff only.
default:=first
charset:
* raw: Use 'raw'.
* str: Use 'str'.
* utf: Use 'utf'.
default:=raw
debug:
Add developer information.
linefit:
* cut: Cut lines to length.
* wrap: Split lines to length.
default:=wrap
indent=#numchars:
Number of characters for indentation.
linewidth=#numchars:
Length of lines.
verbose:
Add progress and status dialogue output.
Returns:
When successful returns 'True', else raises an exception.
Raises:
passed through exceptions:
|
Prints out the resulting list of differences.
Args:
ffs.
Returns:
When successful returns tree represantation.
Raises:
passed through exceptions:
|
Recursive tree compare for Python trees as used for the package 'json'.
Finds diff in native Python trees assembled by the standard package 'json'
and compatible, e.g. 'ujson'.
* leveltop
* levelbottom
* delta (for containers)
* scope(all, first)
* linewidth
* displaycharset (str,utf)
* pathonly
Args:
n0:
JSON string of type 'str', or 'unicode'
n1:
JSON string of type 'str', or 'unicode'
p=[]:
Result entries for each difference:
::
{'n0':n0,'n1':n1,'dl':dl,'p':p[:]}
#. first JSON data
#. second JSON data
#. diff count increment value
#. current diff including path
List of differences as of:
#. non equal types are different: type(n0) != type(n1)
#. equal types, both list: type(n0) is list
#. length is different: len(n0.keys()) != len(n1.keys())
#. at leats one item is different: n1.get(ni) and v != n1[ni]
#. equal types, both dict: type(n0) is dict and type(n1) is dict
#. length is different: len(n0.keys()) != len(n1.keys())
#. at leats one item is different: n1.get(ni) and v != n1[ni]
default:=0
Returns:
When no diffs returns True, else False or raises an exception.
The resulting differences are contained in the provided
list parameter 'p'. When not provided the resulting list
is suppressed.
Raises:
passed through exceptions:
|
| Trees | Indices | Help |
|
|---|
| Generated by Epydoc 3.0.1 on Mon Feb 6 07:50:52 2017 | http://epydoc.sourceforge.net |