Open Sunil1993 opened 6 years ago
Trying to parse large json files using yajl.
The code is working great in my local system. But when deployed in production I am getting 400 HTTP bad request. The file is coming from amazon s3.
Not sure of the exact issue here. Is it because of some authentication or wrong credentials?
Code:
require 'yajl' require 'yajl/deflate' require 'yajl/http_stream' require 'uri' uri = URI.parse(<amazon s3 link>) hash = Yajl::HttpStream.get(uri, { headers: {"Content-Type" => "application/json", "Accept" => "application/json"}})
Error:
Yajl::ParseError: lexical error: invalid char in json text. "2018-01-08T16:04:38Z" } ] HTTP/1.1 400 Bad Request Date: (right here) ------^
Any help would be appreciated.
Trying to parse large json files using yajl.
The code is working great in my local system. But when deployed in production I am getting 400 HTTP bad request. The file is coming from amazon s3.
Not sure of the exact issue here. Is it because of some authentication or wrong credentials?
Code:
Error:
Any help would be appreciated.