inviwopy.json

JSON Module API

Bindings for converting Inviwo Properties, Inports, and Outports to and from JSON-compatible Python objects (dicts, lists, etc). The conversions go through the converter registries owned by the JSONModule.

Example:

import inviwopy
import ivwjson

prop = inviwopy.properties.FloatProperty("threshold", "Threshold", 0.5)
data = ivwjson.toJson(prop)        # -> Python dict
ivwjson.fromJson(prop, data)       # update prop from a dict

Functions

fromJson(*args, **kwargs)

Overloaded function.

getJSONInportConverter()

Get the global JSONInportConverter from the JSON module.

getJSONOutportConverter()

Get the global JSONOutportConverter from the JSON module.

getJSONPropertyConverter()

Get the global JSONPropertyConverter from the JSON module.

toJson(*args, **kwargs)

Overloaded function.

Classes

JSONInportConverter

JSONOutportConverter

JSONPropertyConverter