# Json in Named Query in parameters

**URL:** <https://forum.inductiveautomation.com/t/json-in-named-query-in-parameters/83302>\
**Category:** Ignition\
**Tags:** ignition81, perspective\
**Created:** [December 19, 2023, 9:26am UTC](https://forum.inductiveautomation.com/t/json-in-named-query-in-parameters/83302 "2023-12-19T09:26:33Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![Purushothaman\_R](https://avatars.discourse-cdn.com/v4/letter/p/8797f3/32.png) [@Purushothaman\_R](https://forum.inductiveautomation.com/u/Purushothaman_R)\
**Post date:** [December 19, 2023, 9:26am UTC](https://forum.inductiveautomation.com/t/json-in-named-query-in-parameters/83302/1 "2023-12-19T09:26:33Z")

</div>

Hi guys, i have doubt i have a named query in postgressql for one column(metadata) i need to pass json file inside db so when i tried to pass the json object inside parameters i am getting an error.

 ![image](https://us1.discourse-cdn.com/inductiveautomation/original/3X/8/0/80766d566485deacf7cc2b17e503ee3fc93c3f3f.png)  
i will attact the named query as well here do i need to change the datatype of metadata or what i need to do i am getting error  
 ![image](https://us1.discourse-cdn.com/inductiveautomation/original/3X/e/7/e7e6e0123c7656f292aa6fd7d49ced4162a51e46.png)

---

<div class="post-metadata">

**Author:** ![pascal.fragnoud](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/pascal.fragnoud/32/24728_2.png) [@pascal.fragnoud](https://forum.inductiveautomation.com/u/pascal.fragnoud)\
**Post date:** [December 19, 2023, 9:47am UTC](https://forum.inductiveautomation.com/t/json-in-named-query-in-parameters/83302/2 "2023-12-19T09:47:24Z")

</div>

Can we see how you're calling this named query ?  
And more importantly, how you're passing the `metadata` parameter.

---

<div class="post-metadata">

**Author:** ![Purushothaman\_R](https://avatars.discourse-cdn.com/v4/letter/p/8797f3/32.png) [@Purushothaman\_R](https://forum.inductiveautomation.com/u/Purushothaman_R)\
**Post date:** [December 19, 2023, 9:57am UTC](https://forum.inductiveautomation.com/t/json-in-named-query-in-parameters/83302/3 "2023-12-19T09:57:04Z")

</div>

it is not working now like our team senior developer tried to insert the json values inside parameters it was working there but in web browser i am not able to pass the parameters.I will attach the screenshot of my script as well as the popup

 ![image](https://us1.discourse-cdn.com/inductiveautomation/original/3X/b/6/b638abc4d1a327cc4f12f6cac9b73486c49e5a84.png)  
 ![image](https://us1.discourse-cdn.com/inductiveautomation/original/3X/d/0/d0750eec1264a0717a33514dc5808b72652e8ffe.png)

can anyone help me out!

Thanks for the comment @pascal.fragnoud 😇

---

<div class="post-metadata">

**Author:** ![Transistor](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/transistor/32/3380_2.png) [@Transistor](https://forum.inductiveautomation.com/u/Transistor)\
**Post date:** [December 19, 2023, 6:35pm UTC](https://forum.inductiveautomation.com/t/json-in-named-query-in-parameters/83302/4 "2023-12-19T18:35:53Z")

</div>

Please post code, not pictures of code. That way we can copy and paste in the Script Console and in our answers. [Wiki - how to post code on this forum](https://forum.inductiveautomation.com/t/wiki-how-to-post-code-on-this-forum/77831)

Also, it's a big help if you resize your windows and / or crop your screengrabs. Look at your first image. 98% of it is white space!

---

<div class="post-metadata">

**Author:** ![Purushothaman\_R](https://avatars.discourse-cdn.com/v4/letter/p/8797f3/32.png) [@Purushothaman\_R](https://forum.inductiveautomation.com/u/Purushothaman_R)\
**Post date:** [January 3, 2024, 7:36am UTC](https://forum.inductiveautomation.com/t/json-in-named-query-in-parameters/83302/5 "2024-01-03T07:36:47Z")

</div>

Thanks for the comment @Transistor - sorry for the delay i was on vacation. i got the solution i will paste it here we need use casting so that we can transform string to json

 ![image](https://us1.discourse-cdn.com/inductiveautomation/original/3X/e/6/e612bc01eb4a4effbee761df33f2e0f929586ea4.png)
