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

Announcements
Qlik and ServiceNow Partner to Bring Trusted Enterprise Context into AI-Powered Workflows. Learn More!
cancel
Showing results for 
Search instead for 
Did you mean: 
hvanderborg
Contributor III
Contributor III

Error reading JSON "{0}" is not found or the json format is incorrect.

Hi,
Talend seems to be unable to read the JSON shown below. I have no reason to assume the JSON is incorrectly formed. Other tools seem to read it perfectly well.
Attempt 1: When I try to add it to the repository Talend returns this error:
"{0}" is not found or the json format is incorrect.
Attempt 2: When trying to use tExtract JSONFields I get this error:
Error on line 1 of document : The content of elements must consist of well-formed character data or markup. Nested exception: The content of elements must consist of well-formed character data or markup.
fyi: Using Talend 5.3.0.r101800.
Anyone knows how to solve this?
(please see post below for json code)
Labels (3)
6 Replies
hvanderborg
Contributor III
Contributor III
Author

json code received from webservice, which Talend seems unable to read:
{"id":2000696197,"name":"for temp test in Talend","description":"Describe your view here, for example, explain what filters it uses to select records.","table_id":2000089760,"records":,"record_count":3}
Anonymous
Not applicable

hvanderbord - did you ever figure out what the issue is? Have the exact same problem using tExtractJSONFields and not finding a lot of answers anywhere. JSON validates (3rd party) but can't seem to get things working.
Anonymous
Not applicable

I am also having this problem with tExtractJSONFields being unable to parse a well-formed (passes JSONLint) response string from Google Drive REST API.
My error message is as follows:
Error on line 1 of document : The content of elements must consist of well-formed character data or markup. Nested exception: The content of elements must consist of well-formed character data or markup.
The response string is too large to post here...
Is there some resolution to this?
Royce
nestoru
Contributor
Contributor

This issue is related to https://jira.talendforge.org/browse/TDI-28800
BTW as written there latest 5.4.1 the JSON parsing is even worst. Unfortunately he tFileInputJSON component has been problematic now for ages really. I hope JSON parsing will get better http://thinkinginsoftware.blogspot.com/2013/02/parsing-json-with-talend.html
Anonymous
Not applicable

I decided to use TOS ver 6 RC1 but I stil have the same error. Any  ideea?
David_Beaty
Specialist
Specialist

I had the same problem and resolved it successfully. Seems Talend doesnt like JSON fields that start with a number, so I put a tReplace in before the tExtractJSONFields

Select the correct "Input Column" for me this was "string"
Enter the offending column name, in quotes that will also be escaped, example " \ "2ndURL \ ":"
Set the Replace with as a non-numeric version, example " \ "SecondURL \ ":"
Untick Whole word
Tick Case Sensitive

You will even need to do this if you're not extracting the numeric field name.