Welcome, Guest
A place to meet other Developers

TOPIC: Work with JSON file

Work with JSON file 4 months 3 weeks ago #48030

  • dripper
  • dripper's Avatar
  • Offline
  • Fresh Boarder
  • Posts: 1
  • Karma: 0
Hello.

I started coding a small script to import tags and other information for the manga titles for personal use only.

I prepared the logic to handle each of the entries and installed it as a plugin for ComicRack, but I forgot that comicrack uses Ironpython.

So the script stops working once I try to import the single module that the plugin use - JSON:
import json

I looked into the documentation ( ironpython-test.readthedocs.io/en/latest/library/json.html ) and it seems that it should be present, but it throws an error that the module doesn't exist.

I looked into other people script files and they were using `Newtonsoft.Json.dll` file and I tried to work with that, but once I add the file in the script and try to access the JObject property it throws an error (www.newtonsoft.com/json/help/html/ReadJson.htm)

Looking into this for 3 days without any success.

So my question is how can i convert this :
import json

with open('d:/example.json') as json_data:
    d = json.load(json_data)
    for gallery in d['galleries']:
    ....
into readable script code.

I come from a web based coding background (mainly php) and my python knowledge is very basic, but my IronPython is non-existing, so sorry if the question is so basic. It's kind-a easy to find the python equivalent of the php method, but it seems quite hard to find the ironpython equivalent of the python equivalent of the php method. :D
The administrator has disabled public write access.
Time to create page: 0.155 seconds

Who's Online

We have 216 guests and one member online