# Dynamic JSON – Can’t get text on a START\_OBJECT

**URL:** <https://discuss.elastic.co/t/dynamic-json-can-t-get-text-on-a-start-object/167494>\
**Category:** Elasticsearch\
**Created:** [February 7, 2019, 5:47pm UTC](https://discuss.elastic.co/t/dynamic-json-can-t-get-text-on-a-start-object/167494 "2019-02-07T17:47:16Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![brandondash](https://avatars.discourse-cdn.com/v4/letter/b/76d3ee/32.png) [@brandondash](https://discuss.elastic.co/u/brandondash)\
**Post date:** [February 7, 2019, 5:47pm UTC](https://discuss.elastic.co/t/dynamic-json-can-t-get-text-on-a-start-object/167494/1 "2019-02-07T17:47:17Z")

</div>

(Link to original post that wasn't getting responses: [Dynamic JSON -- Can't get text on a START\_OBJECT](https://discuss.elastic.co/t/dynamic-json-cant-get-text-on-a-start-object/165653))

I know the error means it is expecting a string but gets an object, but I have no idea why only this field breaks. It looks and behaves like every other field yet consistently errors out.

Here is the relevant template I am using:

```
{
  "template" : "logstash-*",
  "version" : 60001,
  "settings" : {
    "index.refresh_interval" : "5s"
  },
  "mappings" : {
    "_default_" : {
      "dynamic_templates" : [ {
        "message_field" : {
          "path_match" : "message",
          "match_mapping_type" : "string",
          "mapping" : {
            "type" : "text",
            "norms" : false
          }
        }
      }, {
        "dynamic_json" : {
          "path_match" : "*ID",
          "match_mapping_type" : "string",
          "mapping" : {
            "type" : "text",
            "norms" : false
          }
        }
      }, {
        "string_fields" : {
          "match" : "*",
          "match_mapping_type" : "string",
          "mapping" : {
            "type" : "text", "norms" : false,
            "fields" : {
              "keyword" : { "type": "keyword", "ignore_above": 256 }
            }
          }
        }
      } ],
      "properties" : {
        "@timestamp": { "type": "date"},
        "@version": { "type": "keyword"},
        "geoip" : {
          "dynamic": true,
          "properties" : {
            "ip": { "type": "ip" },
            "location" : { "type" : "geo_point" },
            "latitude" : { "type" : "half_float" },
            "longitude" : { "type" : "half_float" }
          }
        }
      }
    }
  }
}

```

Here is a sample JSON input:

> {"attendee":[{"userID":["12345"],"fullName":["Doe, John"],"role":["MODERATOR"],"isPresenter":["false"],"isListeningOnly":["false"],"hasJoinedVoice":["true"],"hasVideo":["false"],"clientType":["FLASH"],"os":[{}],"browser":[{}],"browser\_family":[{}],"join\_time":[{}],"ip":[{}],"in\_quality\_percentage":["99"],"in\_mos":["4.492027"],"write\_codec":["SPEEX"],"join\_count":["1"],"conn\_type":["RTMP"],"chat":["0"],"rtt":["0"],"min\_rtt":["0"],"max\_rtt":["0"]}]}

... and here is the error:

> [2019-01-24T18:10:41,110][WARN][logstash.outputs.elasticsearch] Could not index event to Elasticsearch. {:status=\>400, :action=\>["index", {:\_id=\>nil, :\_index=\>"logstash-2019.01.24", :\_type=\>"doc", :\_routing=\>nil}, #LogStash::Event:0x58067416], :response=\>{"index"=\>{"\_index"=\>"logstash-2019.01.24", "\_type"=\>"doc", "\_id"=\>"qR4OgWgBgeY3q0r1jc0J", "status"=\>400, "error"=\>{"type"=\>"mapper\_parsing\_exception", "reason"=\>"failed to parse [meetings.meeting.attendees.attendee.conn\_type]", "caused\_by"=\>{"type"=\>"illegal\_state\_exception", "reason"=\>"Can't get text on a START\_OBJECT at 1:461"}}}}}

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/elastic/original/3X/1/a/1ac57faf039f6b580b3f104ef42a2a89e41014de.png) [@system](https://discuss.elastic.co/u/system)\
**Post date:** [March 7, 2019, 5:47pm UTC](https://discuss.elastic.co/t/dynamic-json-can-t-get-text-on-a-start-object/167494/2 "2019-03-07T17:47:58Z")

</div>

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.
