我需要将格式化的JSON文件转换为单行JSON文件,但是无法做到。有人能帮忙吗?
示例:以下内容需要转换:
[
{
"Employee ID": 1,
"Name": "Abhishek",
"Designation": "Software Engineer"
},
{
"Employee ID": 2,
"Name": "Garima",
"Designation": "Email Marketing Specialist"
}
]
[
{
"Employee ID": 1,
"Name": "Abhishek",
"Designation": "Software Engineer"
},
{
"Employee ID": 2,
"Name": "Garima",
"Designation": "Email Marketing Specialist"
}
]
转换为:
'[{"Employee ID":1,"Name":"Abhishek","Designation":"Software Engineer"},' \
'{"Employee ID":2,"Name":"Garima","Designation":"Email Marketing Specialist"}]'