JSONファイルを綺麗に表示する[JSON]

7月 26, 2020

まずは,jqをインストール.

brew install jq

表示

cat result.json | jq .
{
"hoge": {
"precision": 0.9999999999990001,
"recall": 0.9999999999990001,
"f1_score": 0.9999999999940001
},
"hoge2": {
"precision": 0.9999999999983333,
"recall": 0.9999999999983333,
"f1_score": 0.9999999999933333
},
"hoge3": {
"precision": 0.999999999995,
"recall": 0.999999999995,
"f1_score": 0.99999999999
}
}

JSON

Posted by vastee