用自带的json.dumps函数打包blobs数据为什么输出的json数据在两端会有中括号,标准json数据应该直接是大括号,怎么把这个中括号去了?
output_str = json.dumps(blobs)
# Draw a rect around the blob.
b = blobs[0]
img.draw_rectangle(b[0:4]) # rect
img.draw_cross(b[5], b[6]) # cx, cy
Lm = b[2]*b[3]
#length = K/Lm
print(Lm)
print('you send:',output_str)
uart.write(output_str+'\n')