# -*- coding: utf-8 -*-
from __future__ import division, absolute_import, unicode_literals
NO_JSON_OLD = """
THIS IS NOT A JSON STRING
"""
NO_JSON_NEW = """
AND THIS NEITHER
"""
SIMPLE_OLD = """
{
"a": 1,
"b": true,
"c": "Janošek"
}
"""
SIMPLE_NEW = """
{
"b": false,
"c": "Maruška",
"d": "přidáno"
}
"""
SIMPLE_DIFF = """
{
"_append": {
"d": "přidáno"
},
"_remove": {
"a": 1
},
"_update": {
"c": "Maruška",
"b": false
}
}
"""
SIMPLE_DIFF_HTML="""
json_diff result
json_diff result
a = 1 |
c = Maruška |
b = False |
d = přidáno |
"""
SIMPLE_ARRAY_OLD = """
{
"a": [ 1 ]
}
"""
SIMPLE_ARRAY_NEW = """
{
"a": [ 1, 2 ]
}
"""
SIMPLE_ARRAY_DIFF = """
{
"_update": {
"a": {
"_append": {
"1": 2
}
}
}
}
"""
NESTED_OLD = """
{
"a": 1,
"b": 2,
"ignore": {
"else": true
},
"child": {
"nome": "Janošek"
}
}
"""
NESTED_NEW = """
{
"a": 2,
"c": 3,
"child": {
"nome": "Maruška"
}
}
"""
NESTED_DIFF = """
{
"_append": {
"c": 3
},
"_remove": {
"b": 2,
"ignore": {
"else": true
}
},
"_update": {
"a": 2,
"child": {
"_update": {
"nome": "Maruška"
}
}
}
}
"""
NESTED_DIFF_EXCL = """
{
"_append": {
"c": 3
},
"_remove": {
"b": 2,
"ignore": {
"else": true
}
},
"_update": {
"a": 2
}
}
"""
NESTED_DIFF_INCL = """
{
"_update": {
"child": {
"_update": {
"nome": "Maruška"
}
}
}
}
"""
ARRAY_OLD = """
{
"a": 1,
"b": 2,
"children": [
"Pepíček", "Anička", "Maruška"
]
}
"""
ARRAY_NEW = """
{
"a": 1,
"children": [
"Pepíček", "Tonička", "Maruška"
],
"c": 3
}
"""
ARRAY_DIFF = """
{
"_remove": {
"b": 2
},
"_append": {
"c": 3
},
"_update": {
"children": [
"Pepíček",
"Tonička",
"Maruška"
]
}
}
"""