Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Invalid JSON in mcmodinfo #91

Open
sfxworks opened this issue Jun 17, 2018 · 0 comments
Open

Invalid JSON in mcmodinfo #91

sfxworks opened this issue Jun 17, 2018 · 0 comments

Comments

@sfxworks
Copy link

sfxworks commented Jun 17, 2018

Trying to make my mod scanner. Noticed your mod has some bad json

Getting 228756-2550378
Extracting mcmod.info
Traceback (most recent call last):
  File "convert.py", line 42, in <module>
    mcmodinfo = json.load(g)
  File "/usr/lib64/python3.6/json/__init__.py", line 299, in load
    parse_constant=parse_constant, object_pairs_hook=object_pairs_hook, **kw)
  File "/usr/lib64/python3.6/json/__init__.py", line 354, in loads
    return _default_decoder.decode(s)
  File "/usr/lib64/python3.6/json/decoder.py", line 339, in decode
    obj, end = self.raw_decode(s, idx=_w(s, 0).end())
  File "/usr/lib64/python3.6/json/decoder.py", line 355, in raw_decode
    obj, end = self.scan_once(s, idx)
json.decoder.JSONDecodeError: Invalid control character at: line 5 column 77 (char 128)
[root@vps38015 twitch-to-at]# cat tmp/mcmod.info
[
{
  "modid": "ironchest",
  "name": "Iron Chest",
  "description": "New chests with larger sizes, with in-place upgrade items.
The feature chest is the crystal chest, which is transparent - some inventory contents are visible without opening the chest",
  "version": "1.12.2-7.0.42.827",
  "mcversion": "1.12.2",
  "url": "http://www.minecraftforum.net/topic/981855-",
  "updateUrl": "",
  "authorList": ["cpw"],
  "credits": "By cpw, based on an original idea by Lishid",
  "logoFile": "",
  "screenshots": [],
  "parent":"",
  "dependencies": []
}
]

Based on a run from https://jsonlint.com/ looks like you have some line indentations.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant