Package yapydata :: Package datatree :: Module synjson

Module synjson

source code

The *YapyData.json* module provides *JSON* access in compliance to RFC-7159 [RFC7159]_.


Version: 0.1.1

Author: Arno-Can Uestuensoez

License: Artistic-License-2.0 + Forced-Fairplay-Constraints

Classes
  YapyDataJSONError
Basic JSON syntax error.
  DataTreeJSON
Provides JSON RFC-7159 compliant in-memory data trees.
Functions
 
readout_data(xval, **kargs)
For API call-compliance with other syntaxes. Returns here the input tree only.
source code
 
grow_branch(*subpath, **kargs)
Creates a new branch including the assigned value to the last node. The node types are defined by the types of the subpath entries.
source code
Variables
  __uuid__ = "60cac28d-efe6-4a8d-802f-fa4fc94fa741"
Function Details

readout_data(xval, **kargs)

source code 

For API call-compliance with other syntaxes. Returns here the input tree only.

Args:
xval:
The input tree from the DataTreeJSON - which is the result from json.load().
Returns:
The returns here the input xval.
Raises:
pass-through
Decorators:

grow_branch(*subpath, **kargs)

source code 

Creates a new branch including the assigned value to the last node. The node types are defined by the types of the subpath entries.

Supports a single linear branch only, no sub-branching.

The created path is validated for permitted types. The derived types such as JSON have to support their own branch method. Thus provided as a static method.

Args:
subpath:
Variable list/tuple of path keys and indexes.
kargs:
value:
Value to be assigned to the final node.
Returns:
A created branch.
Raises:
pass-through
Decorators: