Example #1
0
 def test_all(self):
     truth = remove_endline(open("json/testall.json").read())
     doc = {
         "a": [
             10,
             {},
             {
                 "hello": 1,
                 "zzz": []
             },
             "bob",
             "agnes"
         ],
         "1": 55.7,
         "3": {
             "xxxxx": {},
             "ggg": []
         },
         "b": None,
         "c": True,
         "d": False
     }
     s = jsoncanon.dumps(doc)
     self.assertEqual(s, truth)
Example #2
0
 def test_jsoncanon_sorting_lists(self):
     for i in xrange(self.size):
         jsoncanon.dumps(self.doc, sort_lists=True)
Example #3
0
 def test_jsoncanon(self):
     for i in xrange(self.size):
         jsoncanon.dumps(self.doc)