mirror of
https://github.com/python/cpython.git
synced 2025-07-24 03:35:53 +00:00
port simplejson upgrade from the trunk #4136
json also now works only with unicode strings Patch by Antoine Pitrou; updated by me
This commit is contained in:
parent
7255f18556
commit
c6b607d4a9
15 changed files with 2011 additions and 959 deletions
|
@ -11,3 +11,11 @@ class TestDump(TestCase):
|
|||
|
||||
def test_dumps(self):
|
||||
self.assertEquals(json.dumps({}), '{}')
|
||||
|
||||
def test_encode_truefalse(self):
|
||||
self.assertEquals(json.dumps(
|
||||
{True: False, False: True}, sort_keys=True),
|
||||
'{"false": true, "true": false}')
|
||||
self.assertEquals(json.dumps(
|
||||
{2: 3.0, 4.0: 5, False: 1, 6: True}, sort_keys=True),
|
||||
'{"false": 1, "2": 3.0, "4.0": 5, "6": true}')
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue