Script for Dataset build

Wouldn’t the string format be almost all inclusive? How does the u’’ fit in to the response?

u is just an artifact of you printing out the data, it’s not part of the actual representation.

Sigh. My annoyance with your server spitting out this “JSON” continues.

So, lines 1-101 are fine, because they’re strings and have hyphens in them.
My guess is line 102 is coming through in the JSON as an integer, which is perfectly valid JSON, but still enough to blow up the very poor type coercion system.dataset.toDataSet does. This wouldn’t be an issue with the server were smart enough to consistently encode things as strings when they’re strings, but I digress.

Unfortunately, working around that is going to be tricky. If you can make assumptions that the first value in a row will always be a string, it’s easier, but a fully generic solution would be tricky.

Would using DatasetBuilder help in that you could pre-define your datatypes?

1 Like

Damn you’re not kidding, this is one of the worst json i’ve seen, and I’ve seen some truly ugly ones before !
But I’m struggling to understand why toDataSet raises an error there, I mean, 5808989 shouldn’t be a problem, right ? Especially since the first row also contains a integer (8014844) that it apparently had no problem handling.
Would casting everything to string when parsing the json fix the issue ?