# Docs error? Is JSON.stringify not needed for POST in V8?

**URL:** <https://community.dreamfactory.com/t/docs-error-is-json-stringify-not-needed-for-post-in-v8/3745>\
**Category:** uncategorized\
**Created:** [April 3, 2017, 2:49am UTC](https://community.dreamfactory.com/t/docs-error-is-json-stringify-not-needed-for-post-in-v8/3745 "2017-04-03T02:49:32Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![Konrad](https://yyz1.discourse-cdn.com/flex035/user_avatar/community.dreamfactory.com/konrad/32/974_2.png) [@Konrad](https://community.dreamfactory.com/u/Konrad)\
**Post date:** [April 3, 2017, 2:49am UTC](https://community.dreamfactory.com/t/docs-error-is-json-stringify-not-needed-for-post-in-v8/3745/1 "2017-04-03T02:49:32Z")

</div>

HI, I spent some time trying to figure out why my POST request does not work in a V8 event script. Turned out I didn’t need to do JSON.serialize on payload object, just pass it ‘as is’. In the docs examples [here](https://wiki.dreamfactory.com/DreamFactory/Features/Scripting#Resources_Available_To_A_Script) a POST example in V8 serializes the payload, but in Node.js it doesn’t. Serializing the payload gave me :

```auto
"No record(s) detected in request. Please make sure record(s) are wrapped in a 'resource' tag.

```

Is the V8 example wrong or am I missing something?

---

<div class="post-metadata">

**Author:** ![w.k](https://yyz1.discourse-cdn.com/flex035/user_avatar/community.dreamfactory.com/w.k/32/992_2.png) [@w.k](https://community.dreamfactory.com/u/w.k)\
**Post date:** [April 11, 2017, 11:51pm UTC](https://community.dreamfactory.com/t/docs-error-is-json-stringify-not-needed-for-post-in-v8/3745/2 "2017-04-11T23:51:58Z")

</div>

Hi!

There is no serialization in V8 post example. At least for now. So, if it was before, now it is clear: you can pass object.

Wbr,

Gunnar

---

<div class="post-metadata">

**Author:** ![Konrad](https://yyz1.discourse-cdn.com/flex035/user_avatar/community.dreamfactory.com/konrad/32/974_2.png) [@Konrad](https://community.dreamfactory.com/u/Konrad)\
**Post date:** [April 12, 2017, 6:15am UTC](https://community.dreamfactory.com/t/docs-error-is-json-stringify-not-needed-for-post-in-v8/3745/3 "2017-04-12T06:15:45Z")

</div>

```auto
// V8js
 
var url = 'http://example.com/my_api';
var payload = JSON.stringify({"name":"test"});
var options = {
    'headers': {
        'Content-Type': 'application/json'
    },
    'parameters': {
        'api_key': 'my_api_key'
    },
};
var result = platform.api.post(url, payload, options);
var_dump(result);

```

I’m speaking of this fragment. There’s JSON.stringify on the payload. Right below is Node example without it.

---

<div class="post-metadata">

**Author:** ![w.k](https://yyz1.discourse-cdn.com/flex035/user_avatar/community.dreamfactory.com/w.k/32/992_2.png) [@w.k](https://community.dreamfactory.com/u/w.k)\
**Post date:** [April 12, 2017, 8:57am UTC](https://community.dreamfactory.com/t/docs-error-is-json-stringify-not-needed-for-post-in-v8/3745/4 "2017-04-12T08:57:26Z")

</div>

Sorry, you were talking about `payload`, i was looking `options`.

---

<div class="post-metadata">

**Author:** ![formerstaff](https://yyz1.discourse-cdn.com/flex035/user_avatar/community.dreamfactory.com/formerstaff/32/1133_2.png) [@formerstaff](https://community.dreamfactory.com/u/formerstaff)\
**Post date:** [May 3, 2017, 12:46pm UTC](https://community.dreamfactory.com/t/docs-error-is-json-stringify-not-needed-for-post-in-v8/3745/5 "2017-05-03T12:46:27Z")

</div>

That’s correct. JSON.stringify is not needed. I will update the docs.
