格式化 curl 返回的 json

Zhoust發表於2019-04-03
➜  ~ curl 'localhost:9200/get-together/_mapping' | python -m json.tool
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100   225  100   225    0     0  22228      0 --:--:-- --:--:-- --:--:-- 22500
{
    "get-together": {
        "mappings": {
            "group": {
                "properties": {
                    "name": {
                        "fields": {
                            "keyword": {
                                "ignore_above": 256,
                                "type": "keyword"
                            }
                        },
                        "type": "text"
                    },
                    "organizer": {
                        "fields": {
                            "keyword": {
                                "ignore_above": 256,
                                "type": "keyword"
                            }
                        },
                        "type": "text"
                    }
                }
            }
        }
    }
}
複製程式碼

相關文章