def JSONHandler()

in src/block_helper.py [0:0]


def JSONHandler(Obj):
    """Return a JSON representation from an object."""
    if hasattr(Obj, 'reprJSON'):
        return Obj.reprJSON()
    else:
        raise TypeError('Object of type %s with value of %s is not JSON serializable' % (type(Obj), repr(Obj)))