src/eric7/Plugins/CheckerPlugins/SyntaxChecker/jsonCheckSyntax.py

branch
eric7
changeset 9482
a2bc06a54d9d
parent 9473
3f23dbf37dbe
child 9507
1f39839655ea
equal deleted inserted replaced
9481:0b936ff1bbb9 9482:a2bc06a54d9d
5 5
6 """ 6 """
7 Module implementing the syntax check for JSON. 7 Module implementing the syntax check for JSON.
8 """ 8 """
9 9
10 import json
10 import multiprocessing 11 import multiprocessing
11 import queue 12 import queue
12 13
13 14
14 def initService(): 15 def initService():
172 hold a list containing details about the error/ warnings 173 hold a list containing details about the error/ warnings
173 (file name, line number, column, codestring (only at syntax 174 (file name, line number, column, codestring (only at syntax
174 errors), the message, a list with arguments for the message) 175 errors), the message, a list with arguments for the message)
175 @rtype dict 176 @rtype dict
176 """ 177 """
177 import json
178
179 codestring = normalizeCode(codestring) 178 codestring = normalizeCode(codestring)
180 179
181 try: 180 try:
182 json.loads(codestring) 181 json.loads(codestring)
183 except json.JSONDecodeError as exc: 182 except json.JSONDecodeError as exc:

eric ide

mercurial