title: Python generate json: bool malformed query, expected END_OBJECT but found FIELD_NAME
body: <p>i have a probleme with elastic search when i request it with the following json, i have this error: [bool] malformed query, expected [END_OBJECT] but found [FIELD_NAME]
  i've tried to look on many site but none of them give me a response</p>
  <p><div class="snippet" data-lang="js" data-hide="false" data-console="true" data-babel="false">
  <div class="snippet-code">
  <pre class="snippet-code-js lang-js prettyprint-override"><code>{
  
      "query":{
          "bool":{
              "must":[
                  {
                      "match":{
                          "group_issuer_name":"bnp"
                      }
                  },
                  {
                      "match":{
                          "asset_country":"France"
                      }
                  }
              ]
          },
          "aggs":{
              "by_ptf_name":{
                  "terms":{
                      "field":"ptf_name.keyword"
                  },
                  "aggs":{
                      "by_ptf_id":{
                          "terms":{
                              "field":"ptf_id.keyword"
                          },
                          "aggs":{
                              "sum_of_asset_exposure":{
                                  "sum":{
                                      "field":"asset_exposure"
                                  }
                              },
                              "min_of_ptf_total_asset":{
                                  "min":{
                                      "field":"ptf_total_asset"
                                  }
                              }
                          }
                      }
                  }
              }
          }
      }
  
  }</code></pre>
  </div>
  </div>
  </p>