我有以下string
:
"{\n \"type\": \"service_account\",\n \"project_id\": \"my-project-123\",\n \"time\": \"23:00:22.23124\"\n }"
我想要这样的格式JSON
:
{
"type":"service_account",
"project_id":"my-project-123",
"time":"23:00:22.23124"
}
答案 0 :(得分:1)
-e
选项可以在字符串中扩展\n
。
echo -e "put your string here"