# Cannot unmarshal number into Go value of type map\[string\]interface {}

**URL:** <https://discuss.elastic.co/t/cannot-unmarshal-number-into-go-value-of-type-map-string-interface/123822>\
**Category:** Beats\
**Tags:** filebeat\
**Created:** [March 13, 2018, 11:15pm UTC](https://discuss.elastic.co/t/cannot-unmarshal-number-into-go-value-of-type-map-string-interface/123822 "2018-03-13T23:15:04Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Alan\_Yang](https://avatars.discourse-cdn.com/v4/letter/a/bbce88/32.png) [@Alan\_Yang](https://discuss.elastic.co/u/Alan_Yang)\
**Post date:** [March 13, 2018, 11:15pm UTC](https://discuss.elastic.co/t/cannot-unmarshal-number-into-go-value-of-type-map-string-interface/123822/1 "2018-03-13T23:15:04Z")

</div>

Here is my log:  
2017-05-12 08:46:35.1280 - INFO: Performance - ConfigurationComponent.GetCountryFields executed in 2625 ms. - {"Class":"ConfigurationComponent","Method":"GetCountryFields","Ms":"test","Ticks":"test1"}

Here is my filebeat.yml :  
filebeat.prospectors:

- type: log

Then I always get this error in kibana: Error decoding JSON: json: cannot unmarshal number into Go value of type map[string]interface {}

Read all related topic here, does not help

---

<div class="post-metadata">

**Author:** ![ruflin](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/ruflin/32/3116_2.png) [@ruflin](https://discuss.elastic.co/u/ruflin)\
**Post date:** [March 14, 2018, 7:43am UTC](https://discuss.elastic.co/t/cannot-unmarshal-number-into-go-value-of-type-map-string-interface/123822/2 "2018-03-14T07:43:51Z")

</div>

Your log line is not json. It is first text that then contains somewhere json. If you configure json it expects the full line to be json.

If you want to somehow extract the above json into structured data I recommend you to send the data through LS and there try to extract and decode the necessary part.

---

<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:** [April 11, 2018, 7:44am UTC](https://discuss.elastic.co/t/cannot-unmarshal-number-into-go-value-of-type-map-string-interface/123822/3 "2018-04-11T07:44:25Z")

</div>

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