# Payload decoding error

**URL:** <https://discourse.nodered.org/t/payload-decoding-error/66924>\
**Category:** General\
**Created:** [25 August 2022 16:29 UTC](https://discourse.nodered.org/t/payload-decoding-error/66924 "2022-08-25T16:29:17Z")\
**Posts on this page:** 1\
**Showing post:** 4

<div class="post-metadata">

**Author:** ![MecatronicaMADE](https://avatars.discourse-cdn.com/v4/letter/m/ce7236/32.png) [@MecatronicaMADE](https://discourse.nodered.org/u/MecatronicaMADE)\
**Post date:** [25 August 2022 17:32 UTC](https://discourse.nodered.org/t/payload-decoding-error/66924/4 "2022-08-25T17:32:15Z")

</div>

I think that you had already found the solution:

> [@Error in payload](https://discourse.nodered.org/t/error-in-payload/65715/7):
>
> Thank you @Steve-Mcl its working now without any errors. I figured out a fix for it and while the .json format was fine by itself , msg.payload could only be used with as a function block. when I try to use the same .json code in the inject node as a .json input itr gives me error unless I remove the msg.paylaod line and return.msg line.

Post: [error in payload](https://discourse.nodered.org/t/error-in-payload/65715)

---

_[View the full topic](https://discourse.nodered.org/t/payload-decoding-error/66924)._
