Closed rurabe closed 10 years ago
Thanks for bringing this to my attention; I'll see if there's perhaps another way of going about fixing it (not overly concerned with ugliness though) and put a patch in.
So my inattention and delay may have solved this for us actually: http://developer.crunchbase.com/forum/read/180214
They seem to have fixed this particular bug. I'm going to therefore close this, but as this isn't the first time they've had bugs of this nature (there's a reason that
resp = resp.gsub(/[[:cntrl:]]/, '')
exists in api.rb) it might be preferable to raise our own exception on malformed JSON going forward. I'll give it some thought.
This is more Crunchbase's fault, since it returns calls to this endpoint with invalid json. But since it's broken here you could implement a patch.
It seems what it's doing is returning arrays of 1000 records, concatenating the json (thus making it invalid).
super ugly patch as follows: