我有一个文件,其中存在多个JSON
{
"schema": "2.0",
"comp": [
"fid1"
],
"name": "Temp1",
"type": "type1",
"attr": {
"version": "10.2.0.3"
}
}
{
"time": "18:21:58",
"process": "Start",
"msg": "Start"
}
我想将其解析为多个JSON对象。我尝试使用json.load,但由于它不是一个纯json文件,因此无法工作。其他选择包括:
有没有其他方法可以进行解析,并且即使文件大小增加也可以进行调整?此外,文件中的JSON可能不同
将其作为字符串处理并使用堆栈保存“{”(无法用于键或值包含单个
{
、}
或}\w*{
):结果:
相关问题 更多 >
编程相关推荐