Skip to content

Commit a274e73

Browse files
committed
add dir
1 parent 94c6b9c commit a274e73

File tree

3 files changed

+5
-4
lines changed

3 files changed

+5
-4
lines changed

clear.py half_json/core.py

+4-3
Original file line numberDiff line numberDiff line change
@@ -113,8 +113,8 @@ def process_number():
113113

114114
def find_stop(line):
115115
try:
116-
# import pdb
117-
# pdb.set_trace()
116+
import pdb
117+
pdb.set_trace()
118118

119119
# 暂时只考虑 1 行的情况
120120
obj, end = decoder.scan_once(line, 0)
@@ -128,6 +128,7 @@ def find_stop(line):
128128
nextchar = line[pos: pos+1]
129129
parser = err_info["parser"]
130130
errmsg = err_info["errmsg"]
131+
lastchar = line[pos-1: pos]
131132

132133
# 02
133134
if errmsg == "Unterminated string starting at":
@@ -158,6 +159,7 @@ def find_stop(line):
158159
return False, insert_line(line, ",", pos)
159160
# 11
160161
if parser == "JSONArray" and errmsg == "Expecting object":
162+
# ?
161163
if nextchar == ",":
162164
return False, insert_line(line, "null", pos)
163165
# 11.1
@@ -171,7 +173,6 @@ def find_stop(line):
171173
if parser == "JSONArray" and errmsg == "Expecting ',' delimiter":
172174
"""
173175
code:
174-
175176
end += 1
176177
if nextchar == ']':
177178
break

half_json/json_util.py

Whitespace-only changes.

oneline.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
[{}, C4LD", "Qnj"]
1+
[{},C4LD","Qnj"]

0 commit comments

Comments
 (0)