Example #1
0
    def testSimple(self):
        buf = io.StringIO("""{
      "foo": "bar"
    }""")

        expected = {
            "foo": "bar",
        }
        self.assertEqual(json.ReadFromFile(buf), expected)
Example #2
0
 def testUnicode(self):
     buf = io.StringIO("""["🐊", "🐢", "🦎", "🐍"]""")
     self.assertEqual(json.ReadFromFile(buf), ["🐊", "🐢", "🦎", "🐍"])