在将 Json String 发布到 StackOverflow 之前,格式化 Json String 的最简单方法是什么?
我不想手动格式化它,大多数在线网站只验证 Json 但不格式化。
从:
[{"lines":{"0": "Hammersmith & City","1": "Circle"},"id": "233","name": "Shepherd's Bush Market"},{"lines": {"0": "Hammersmith & City","1": "Circle"},"id": "233","name": "Shepherd's Bush Market"},{"lines": {"0": "Hammersmith & City","1": "Circle"},"id": "233","name": "Shepherd's Bush Market"}]
我想让它像:
[{
"lines": {
"0": "Hammersmith & City",
"1": "Circle"
},
"id": "233",
"name": "Shepherd's Bush Market"
},
{
"lines": {
"0": "Hammersmith & City",
"1": "Circle"
},
"id": "233",
"name": "Shepherd's Bush Market"
},
{
"lines": {
"0": "Hammersmith & City",
"1": "Circle"
},
"id": "233",
"name": "Shepherd's Bush Market"
}]
谢谢,
[编辑]
没有对 java 的引用,但这个问题对于 java(Android) 开发人员来说是实际的