How to use the jsondiff.symbols.Symbol function in jsondiff

To help you get started, we’ve selected a few jsondiff examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github xlwings / jsondiff / jsondiff / symbols.py View on Github external
def __init__(self, label):
        self.label = label

    def __repr__(self):
        return self.label

    def __str__(self):
        return "$" + self.label

missing = Symbol('missing')
identical = Symbol('identical')
delete = Symbol('delete')
insert = Symbol('insert')
update = Symbol('update')
add = Symbol('add')
discard = Symbol('discard')
replace = Symbol('replace')
left = Symbol('left')
right = Symbol('right')

_all_symbols_ = [
    missing,
    identical,
    delete,
    insert,
    update,
    add,
    discard,
    replace,
    left,
    right
]
github xlwings / jsondiff / jsondiff / symbols.py View on Github external
class Symbol(object):
    def __init__(self, label):
        self.label = label

    def __repr__(self):
        return self.label

    def __str__(self):
        return "$" + self.label

missing = Symbol('missing')
identical = Symbol('identical')
delete = Symbol('delete')
insert = Symbol('insert')
update = Symbol('update')
add = Symbol('add')
discard = Symbol('discard')
replace = Symbol('replace')
left = Symbol('left')
right = Symbol('right')

_all_symbols_ = [
    missing,
    identical,
    delete,
    insert,
    update,
    add,
    discard,
    replace,
    left,
    right
github xlwings / jsondiff / jsondiff / symbols.py View on Github external
class Symbol(object):
    def __init__(self, label):
        self.label = label

    def __repr__(self):
        return self.label

    def __str__(self):
        return "$" + self.label

missing = Symbol('missing')
identical = Symbol('identical')
delete = Symbol('delete')
insert = Symbol('insert')
update = Symbol('update')
add = Symbol('add')
discard = Symbol('discard')
replace = Symbol('replace')
left = Symbol('left')
right = Symbol('right')

_all_symbols_ = [
    missing,
    identical,
    delete,
    insert,
    update,
    add,
    discard,
    replace,
    left,
github xlwings / jsondiff / jsondiff / __init__.py View on Github external
def _escape(self, o):
        if type(o) is Symbol:
            return "$" + o.label
        if isinstance(o, string_types) and o.startswith('$'):
            return "$" + o
        return o
github xlwings / jsondiff / jsondiff / symbols.py View on Github external
class Symbol(object):
    def __init__(self, label):
        self.label = label

    def __repr__(self):
        return self.label

    def __str__(self):
        return "$" + self.label

missing = Symbol('missing')
identical = Symbol('identical')
delete = Symbol('delete')
insert = Symbol('insert')
update = Symbol('update')
add = Symbol('add')
discard = Symbol('discard')
replace = Symbol('replace')
left = Symbol('left')
right = Symbol('right')

_all_symbols_ = [
    missing,
    identical,
    delete,
    insert,
    update,
    add,
github xlwings / jsondiff / jsondiff / symbols.py View on Github external
class Symbol(object):
    def __init__(self, label):
        self.label = label

    def __repr__(self):
        return self.label

    def __str__(self):
        return "$" + self.label

missing = Symbol('missing')
identical = Symbol('identical')
delete = Symbol('delete')
insert = Symbol('insert')
update = Symbol('update')
add = Symbol('add')
discard = Symbol('discard')
replace = Symbol('replace')
left = Symbol('left')
right = Symbol('right')

_all_symbols_ = [
    missing,
    identical,
    delete,
    insert,
    update,
    add,
    discard,
github xlwings / jsondiff / jsondiff / symbols.py View on Github external
class Symbol(object):
    def __init__(self, label):
        self.label = label

    def __repr__(self):
        return self.label

    def __str__(self):
        return "$" + self.label

missing = Symbol('missing')
identical = Symbol('identical')
delete = Symbol('delete')
insert = Symbol('insert')
update = Symbol('update')
add = Symbol('add')
discard = Symbol('discard')
replace = Symbol('replace')
left = Symbol('left')
right = Symbol('right')

_all_symbols_ = [
    missing,
    identical,
    delete,
    insert,
    update,
    add,
    discard,
    replace,
github xlwings / jsondiff / jsondiff / symbols.py View on Github external
def __repr__(self):
        return self.label

    def __str__(self):
        return "$" + self.label

missing = Symbol('missing')
identical = Symbol('identical')
delete = Symbol('delete')
insert = Symbol('insert')
update = Symbol('update')
add = Symbol('add')
discard = Symbol('discard')
replace = Symbol('replace')
left = Symbol('left')
right = Symbol('right')

_all_symbols_ = [
    missing,
    identical,
    delete,
    insert,
    update,
    add,
    discard,
    replace,
    left,
    right
]

__all__ = [
    'missing',
github xlwings / jsondiff / jsondiff / symbols.py View on Github external
def __repr__(self):
        return self.label

    def __str__(self):
        return "$" + self.label

missing = Symbol('missing')
identical = Symbol('identical')
delete = Symbol('delete')
insert = Symbol('insert')
update = Symbol('update')
add = Symbol('add')
discard = Symbol('discard')
replace = Symbol('replace')
left = Symbol('left')
right = Symbol('right')

_all_symbols_ = [
    missing,
    identical,
    delete,
    insert,
    update,
    add,
    discard,
    replace,
    left,
    right
]

__all__ = [