def test_to_json(self):

        pretty = '''{
          "marks": [],
          "axes": [],
          "data": [],
          "scales": [],
          "legends": []
        }'''

        test = Visualization()
        actual, tested = json.loads(pretty), json.loads(test.to_json())
        nt.assert_dict_equal(actual, tested)
Test JSON to string
dataset/ETHPy150Open wrobstory/vincent/tests/test_vega.py/TestVisualization.test_to_json