Kodi Community Forum

Full Version: No json in XBMC?
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Hi,
I'm new to all this, XBMC, Python and JSON, but need to complete a demo for work ASAP!

I need to communicate with a server via HTTP. This server returns data in JSON format. I've tested this in standalone Python and it's fine. However the module will not load from Python in XBMC.

i.e. import json
and
import simplejson
do not work

Any help appreciated!
btw this is under Windows 7
Do you have the modules?

XBMC contains python2.4 - I don't know whether it has the modules there or not. A debug log will likely tell you whether it can find them or not.

If not, you'll have to include those modules yourself.

Cheers,
Jonathan
As far as I can tell json and simplejson were not included in Python until later versions.

As I cannot see any json modules compatible with Py 2.4 I wonder if it is possible to update the version of Python embedded with XMBC?
If you're on Linux you can use external python, yes. On win32 it's not quite so simple.