Python: Can't decode a json string
<pre><code>import json
from gfycat.client import GfycatClient
client = GfycatClient()
r = client.query_gfy("CandidOffensiveAfricanaugurbuzzard")
robject = json.loads(r)
print robject['gifUrl']
</code></pre>

<p>This is my current source code. It's meant to get a gifurl in the json text, but it just doesn't. If I don't use robject I get KeyError: 'gifUrl'and if I do use the above code I get some generic errors. </p>

<p>Your JSON sample is invalid with multiple different errors. Run it through the JSON validator linked below to get a detailed list.</p>

<p><a href="https://jsonformatter.curiousconcept.com/" rel="nofollow">https://jsonformatter.curiousconcept.com/</a></p>

python json decode