JSON Parser Step Error - Flow Designer
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎11-26-2020 02:03 AM
Hi,
How do I use JSON parser step in flow designer along with 'REST' response saved as attachment ?
So I am making a Get REST call and saving the JSON response as a .txt attachment in servicenow. I'd like to use JSON parser step after this to parse response saved in the attachment. I'm looking up for the attachment and passing it to JSON parser step. However, it throws an error stating this 'JsonParserOperation failed: Extraction of Complex Object failed: JsonStreamParser[0]: JSON must be an object or an array: '4' com.glide.transform.transformer.exceptions.InvalidStructureException'
Please advise.
- Labels:
-
Event Management
-
Orchestration (ITOM)
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎12-02-2020 09:10 AM
Thanks for the update.
Please close the question by marking your own response as correct
Ankur
✨ Certified Technical Architect || ✨ 9x ServiceNow MVP || ✨ ServiceNow Community Leader
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎10-11-2023 04:16 AM
what was the solution then

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎11-27-2020 12:37 PM
Hi,
Can you show the configuration please?
Thanks,
Ashutosh
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎12-02-2020 08:33 AM
Hi Ashutosh,
I've figured this out. It threw error only when I used MID server to make a REST call. Thank you though.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎06-15-2023 05:41 AM - edited ‎07-07-2023 07:50 AM
In case anyone else comes up against this error or similar, this is either due to hitting a limit within Flow Designer, causing the JSON to get cut off mid string, making it invalid structure during parsing OR you're hitting an error (ex: 400, 503, etc.), hence the first digit in the error message. Check your resource path.
The solution I implemented was to create a Data Stream instead of a basic Action. Data streams are currently only available for those who have the IntegrationHub Enterprise licensure and plugin installed, but it appears to be the best way to handle big REST calls. This also reduced flow run time from ~3 hours to 7 minutes.
Link to course on Data Stream Actions
If you don't have IntegrationHub Enterprise, you may need to reduce the amount of data you're handling or explore alternative ways to retrieve and parse it.