Four Stars

[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.
1 ACCEPTED SOLUTION

Accepted Solutions
One Star

Re: [resolved] tFileInputJSON not escaping period (.) ?

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

Re: [resolved] tFileInputJSON not escaping period (.) ?

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

Re: [resolved] tFileInputJSON not escaping period (.) ?

It worked! Thank you very much!
Four Stars

Re: [resolved] tFileInputJSON not escaping period (.) ?

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