# Converting \*entire\* msg object to JSON

**URL:** https://discourse.nodered.org/t/converting-entire-msg-object-to-json/5967
**Category:** General
**Created:** [19 December 2018 15:39 UTC](https://discourse.nodered.org/t/converting-entire-msg-object-to-json/5967 "2018-12-19T15:39:35Z")
**Posts on this page:** 1
**Showing post:** 2

<div class="post-metadata">

### Author: ![TotallyInformation](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/totallyinformation/32/31_2.png) [@TotallyInformation](https://discourse.nodered.org/u/TotallyInformation)
#### Post date: [19 December 2018 15:50 UTC](https://discourse.nodered.org/t/converting-entire-msg-object-to-json/5967/2 "2018-12-19T15:50:40Z")

</div>

You will need to be aware of what is in the content of the msg object. Some things cannot be serialised (e.g. functions).

Then you can use a function node with JavaScript standard JSON object which has a serialise capability. This turns a JavaScript object into a string which you can pass and then parse at the other end.

`JSON.parse()` reverses the serialise.

---

_[View the full topic](https://discourse.nodered.org/t/converting-entire-msg-object-to-json/5967)._
