- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-07-2025 12:21 AM
Hi,
I have created a field named "Current Versions" in the cmdb_software_product_model table.
I added the following data to this field:
{
"abc": "test",
"bcd": "tst"
}
After saving the record, I tried to retrieve it using the Table API via a curl command.
However, the value of the "Current Versions" field is returned as a JSON string, like this:
"{\"abc\":\"test\",\"bcd\":\"tst\"}"
I have set the field type as Name-Value Pairs, but the API is still returning it as an escaped string instead of a JSON object.
Is this the expected behavior, or am I doing something wrong?
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-07-2025 12:51 AM - edited 04-07-2025 12:52 AM
that's how data is stored in Name-value pair field type i.e. JSON string
That's OOTB behavior.
good explanation here
Exploring dictionary types : Name-Value Pairs
If my response helped please mark it correct and close the thread so that it benefits future readers.
Ankur
✨ Certified Technical Architect || ✨ 9x ServiceNow MVP || ✨ ServiceNow Community Leader
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-07-2025 12:51 AM - edited 04-07-2025 12:52 AM
that's how data is stored in Name-value pair field type i.e. JSON string
That's OOTB behavior.
good explanation here
Exploring dictionary types : Name-Value Pairs
If my response helped please mark it correct and close the thread so that it benefits future readers.
Ankur
✨ Certified Technical Architect || ✨ 9x ServiceNow MVP || ✨ ServiceNow Community Leader
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-07-2025 01:01 AM
Is this behaviour documented anywhere?