1
0
mirror of https://github.com/ultrajson/ultrajson.git synced 2024-11-24 05:12:02 +01:00

Added support for escaping front slash

This commit is contained in:
Jonas Tarnstrom 2011-12-14 15:25:41 +01:00
parent dfb797d8bf
commit 21c5a1c749

@ -59,10 +59,10 @@ class UltraJSONTests(TestCase):
self.assertEquals(input, ujson.decode(output))
def test_encodeStringConversion(self):
input = "A string \\ \/ \b \f \n \r \t"
input = "A string \\ / \b \f \n \r \t"
output = ujson.encode(input)
self.assertEquals(input, json.loads(output))
self.assertEquals(output, json.dumps(input))
self.assertEquals(output, '"A string \\\\ \\/ \\b \\f \\n \\r \\t"')
self.assertEquals(input, ujson.decode(output))
pass