new JSON Reader in KNIME 4.4 (and 4.7.3

Hello Knime Support!
I still have troubles with the JSON Reader introduced in KNIME 4.4
My original Post was automatic closed but can be found here:

I now have found what maybe leads to the Problem: My URL is 333 chars long (and will grow over time), since one parameter is a comma seperated list of numbers. If I truncated the list to below 300 chars everything works fine.

Could you please recheck this issue
Thanks
Matthias

Here is the Workflow from my previous post

thanks for your support.
Matthias

Hi, I actually have a similar problem with the file reader. In your case, I’m wondering if the GET Request node would work to retrieve the JSON. However, there might also be a 300 chars limitation, so maybe POST Request might even be better.
As possibility to reduce the URL length: do you really need to provide all parameters at once, or is this a query parameter that could be sent via several queries (thinking about a chunk loop here)?

1 Like

Hy!
My problem is, that I need more than 300 chars (authentification, reporttype & id, list of selected Ids). Especially the list of Ids increase over the course of the year.

I search for the maximum URL length, and it is recommended to have URLs with a maximum auf 2.048 Chars (see below). Several Browsers and all Web-Server support much longer URLs. But I think KNIME is able to support at least 2.048 Chars

best regards
Matthias

URL limits:

Hi,
I think the problem is not the URL length, but a timeout. Maybe the longer your URL, the more data you fetch and the longer it takes the server to respond? I just tried the JSON Reader with this URL:

https://httpbin.org/anything?long=abcdefghijklmnopqursuvwxzabcdefghijklmnopqursuvwxzabcdefghijklmnopqursuvwxzabcdefghijklmnopqursuvwxzabcdefghijklmnopqursuvwxzabcdefghijklmnopqursuvwxzabcdefghijklmnopqursuvwxzabcdefghijklmnopqursuvwxzabcdefghijklmnopqursuvwxzabcdefghijklmnopqursuvwxzabcdefghijklmnopqursuvwxzabcdefghijklmnopqursuvwxz

Which just returns information about the request as JSON back to the caller. When I did not increase the timeout, I got the same error as you. When I adjusted it to 20 seconds, the node ran through fine. But generally, it may be better to use the GET Request for such cases, because it can handle HTTP error codes much more smartly. If the server sets the content-type header to application/json, the node will automatically return a JSON cell.
Kind regards,
Alexander

5 Likes

Thanks! That was the problem.

I will consider the GET Request node next time, but the “JSON Reader” with JSONPath + “JSON to Table” is much faster then “GET Request” + “JSON to Table”.

all the best
Matthias

3 Likes

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.