# Convert message to JSON problem

**URL:** <https://discourse.nodered.org/t/convert-message-to-json-problem/8076>\
**Category:** General\
**Created:** [17 February 2019 19:25 UTC](https://discourse.nodered.org/t/convert-message-to-json-problem/8076 "2019-02-17T19:25:49Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![mgalazka](https://avatars.discourse-cdn.com/v4/letter/m/a9adbd/32.png) [@mgalazka](https://discourse.nodered.org/u/mgalazka)\
**Post date:** [17 February 2019 19:25 UTC](https://discourse.nodered.org/t/convert-message-to-json-problem/8076/1 "2019-02-17T19:25:49Z")

</div>

Hello,

I'm trying to convert string to JSON. The string is a message which Node Red receives via UDP.  
The message is:  
{"method": "GET", "address": "192.168.0.14/api/getdata"}  
Debugger says - "Unexpected token in JSON at position 57"

Have you got any ideas how to handle this?

Thanks!

---

<div class="post-metadata">

**Author:** ![ukmoose](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/ukmoose/32/13_2.png) [@ukmoose](https://discourse.nodered.org/u/ukmoose)\
**Post date:** [17 February 2019 19:37 UTC](https://discourse.nodered.org/t/convert-message-to-json-problem/8076/2 "2019-02-17T19:37:10Z")

</div>

are you sure it’s a string what you have shared appears to be a javascript object.

What is your flow? If you send it straight from the UDP node to the debug what does it show?
