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

Six Stars

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)
Six Stars

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

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}
One Star

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

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.
One Star

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

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
One Star

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

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
One Star

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

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

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

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.
Regards

David

Don't forget to give Kudos when an answer is helpful or the solution.