merge json library with simplejson 2.0.9 (issue 4136)

This commit is contained in:
Bob Ippolito 2009-03-17 23:19:00 +00:00
parent 277859d591
commit d914e3f861
13 changed files with 2430 additions and 582 deletions

View file

@ -13,3 +13,10 @@ class TestDecode(TestCase):
rval = json.loads('1', parse_int=float)
self.assert_(isinstance(rval, float))
self.assertEquals(rval, 1.0)
def test_decoder_optimizations(self):
# Several optimizations were made that skip over calls to
# the whitespace regex, so this test is designed to try and
# exercise the uncommon cases. The array cases are already covered.
rval = json.loads('{ "key" : "value" , "k":"v" }')
self.assertEquals(rval, {"key":"value", "k":"v"})