Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Qlik Connect 2026 Agenda Now Available: Explore Sessions
cancel
Showing results for 
Search instead for 
Did you mean: 
NoNameFound
Contributor III
Contributor III

JSON from REST endpoint assumes wrong form (Qlik Sense Enterprise for Windows)

I've stumbled upon the following problem recently:
When I load JSON data through the Qlik Sense REST Connector from an endpoint, the format of the data I get back is defined by the first entry in the response, at least I feel like that's the case.

When the first entry in the response body contains a sub-array with no data, the script automatically assumes that this is the case for that specific sub-array in the following entries aswell, meaning I have no chance to know wether my load is complete and structurally sound when loading JSON through the REST connector.

When the first entry of the response contains an empty sub-array, there will be no table created for it, regardless of the following entries having data in said sub-array.

I would love to have a native way to parse JSON rather than explicitly parse everything out myself or lose data by Qlik interpreting empty sub-arrays as null in the first response entry and subsequently every entry that follows.

Our temporary workaround is having a dummy entry return as the first entry with complete (albeit dummy) data incl. sub-arrays, so the tables are created.

Has anyone else encountered this problem?

Labels (3)
2 Replies
rwunderlich
Partner Ambassador/MVP
Partner Ambassador/MVP

"I would love to have a native way to parse JSON..."

You may be able to parse as you want using JsonGet() function. For example:

Raw:
Load * Inline [
json
"{"invoice": 123, "items": [{"item": "bread"}, {"item": "jam"}]]}"
"{"invoice": 456, "items": [{"item": "pants"}, {"item": "shoes"}, {"item": "socks"}]]}"
];
 
Data:
LOAD 
  JsonGet(json, '/invoice') as Invoice,
  JsonGet(json, '/items/*/item') as item
Resident Raw;
 
rwunderlich_0-1745417591419.png
 
 
NoNameFound
Contributor III
Contributor III
Author

Hello Rob,

thank you for your answer!

As far as I know the JSONGet() works for for inline JSON data and .json files loaded directly from a drive / folder connection.
How would I use this on the REST Connector?

Also this unfortunately kind of defeats my purpose as I don't want to hardcode the fields that are useful to extract from the response, but rather get the complete JSON response to begin with before doing anything to it.
The JSON response is subject to change, so hardcoding fields is not really a viable option as there might be more fields/arrays added or removed.

As a little bonus: I'm not allowed to use anything other than Qlik Sense, so no parsing beforehand via external script etc...

Best regards