mirror of
https://github.com/ultrajson/ultrajson.git
synced 2024-11-24 01:04:19 +01:00
Added support for escaping front slash
This commit is contained in:
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
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user