def test_js_to_json_realworld(self):
    inp = "{\n            'clip':{'provider':'pseudo'}\n        }"
    self.assertEqual(js_to_json(inp), '{\n            "clip":{"provider":"pseudo"}\n        }')
    json.loads(js_to_json(inp))
    inp = "{\n            'playlist':[{'controls':{'all':null}}]\n        }"
    self.assertEqual(js_to_json(inp), '{\n            "playlist":[{"controls":{"all":null}}]\n        }')
    inp = '"The CW\\\'s \\\'Crazy Ex-Girlfriend\\\'"'
    self.assertEqual(js_to_json(inp), '"The CW\'s \'Crazy Ex-Girlfriend\'"')
    inp = '"SAND Number: SAND 2013-7800P\\nPresenter: Tom Russo\\nHabanero Software Training - Xyce Software\\nXyce, Sandia\\u0027s"'
    json_code = js_to_json(inp)
    self.assertEqual(json.loads(json_code), json.loads(inp))
    inp = "{\n            0:{src:'skipped', type: 'application/dash+xml'},\n            1:{src:'skipped', type: 'application/vnd.apple.mpegURL'},\n        }"
    self.assertEqual(js_to_json(inp), '{\n            "0":{"src":"skipped", "type": "application/dash+xml"},\n            "1":{"src":"skipped", "type": "application/vnd.apple.mpegURL"}\n        }')
    inp = '{"foo":101}'
    self.assertEqual(js_to_json(inp), '{"foo":101}')
    inp = '{"duration": "00:01:07"}'
    self.assertEqual(js_to_json(inp), '{"duration": "00:01:07"}')
    inp = '{segments: [{"offset":-3.885780586188048e-16,"duration":39.75000000000001}]}'
    self.assertEqual(js_to_json(inp), '{"segments": [{"offset":-3.885780586188048e-16,"duration":39.75000000000001}]}')
def test_js_to_json_realworld(self):
    inp = "{\n            'clip':{'provider':'pseudo'}\n        }"
    self.assertEqual(js_to_json(inp), '{\n            "clip":{"provider":"pseudo"}\n        }')
    json.loads(js_to_json(inp))
    inp = "{\n            'playlist':[{'controls':{'all':null}}]\n        }"
    self.assertEqual(js_to_json(inp), '{\n            "playlist":[{"controls":{"all":null}}]\n        }')
    inp = '"The CW\\\'s \\\'Crazy Ex-Girlfriend\\\'"'
    self.assertEqual(js_to_json(inp), '"The CW\'s \'Crazy Ex-Girlfriend\'"')
    inp = '"SAND Number: SAND 2013-7800P\\nPresenter: Tom Russo\\nHabanero Software Training - Xyce Software\\nXyce, Sandia\\u0027s"'
    json_code = js_to_json(inp)
    self.assertEqual(json.loads(json_code), json.loads(inp))
    inp = "{\n            0:{src:'skipped', type: 'application/dash+xml'},\n            1:{src:'skipped', type: 'application/vnd.apple.mpegURL'},\n        }"
    self.assertEqual(js_to_json(inp), '{\n            "0":{"src":"skipped", "type": "application/dash+xml"},\n            "1":{"src":"skipped", "type": "application/vnd.apple.mpegURL"}\n        }')
    inp = '{"foo":101}'
    self.assertEqual(js_to_json(inp), '{"foo":101}')
    inp = '{"duration": "00:01:07"}'
    self.assertEqual(js_to_json(inp), '{"duration": "00:01:07"}')
    inp = '{segments: [{"offset":-3.885780586188048e-16,"duration":39.75000000000001}]}'
    self.assertEqual(js_to_json(inp), '{"segments": [{"offset":-3.885780586188048e-16,"duration":39.75000000000001}]}')