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

Announcements
Join us in Bucharest on Sept 18th for Qlik's AI Reality Tour! Register Now
cancel
Showing results for 
Search instead for 
Did you mean: 
jkrfs
Creator
Creator

[resolved] tFileInputJSON not escaping period (.) ?

I am pulling in data with JSON which normally works well, however my response has a period in its nested structure
Here is my test case.
JSON data:
{"errors":{"error.loaderFailure":}}
The correct JSONpath query is this:
"$.errors.error\.loaderFailure"
The backslash should be escaping the period, but in the tFileInputJSON it is not.
I know this should work because if I change the response to look like this:
{"errors":{"error_loaderFailure":}}
And if I change the JSONPath query in tFileInputJSON to this:
"$.errors.error_loaderFailure"
Then the json file is parsed correctly.
Anyone have any insight in this? I'm using TOS 4.2.2.
Labels (3)
1 Solution

Accepted Solutions
Anonymous
Not applicable

Vexing problem...I tested this against your input with a '.' (parsed) and a string with '_' (rejected).
"$.errors"

View solution in original post

3 Replies
Anonymous
Not applicable

Vexing problem...I tested this against your input with a '.' (parsed) and a string with '_' (rejected).
"$.errors"
jkrfs
Creator
Creator
Author

It worked! Thank you very much!
jkrfs
Creator
Creator
Author

I have another question:
Is there a way to group everything under one path? Using the above example with a modification:
{"errors":{"error.loaderFailure":}{"error.anotherTypeOfFailure":}}
So, let's say I want to grab everything that is at $.errors.*
My output would be:
This is a row of error data
"Another row of erroneous data.
This is a third row of error data
The last row of erroneous data.
--
This way, I can avoid having errors of the tFileInputJson component not finding the specific path? Since the errors that come back through JSON can be a wide variety of kinds of errors I've had this error: "Can't find any data with JSONPath $.errors". But there were infact errors coming back, just different kinds.
If this is not possible, I suppose they'd have to implement a "Ignore Missing Path" option in the tFileInputJSON component.
Thanks