lib/DataSift/apiclient.rb in datasift-1.0.0 vs lib/DataSift/apiclient.rb in datasift-1.1.0

- old
+ new

@@ -7,11 +7,11 @@ # # The ApiClient class wraps the functionality that makes calls to the # DataSift API. require 'rest_client' -require 'crack' +require 'json' module DataSift # ApiCLient class. # # == Introduction @@ -44,11 +44,11 @@ # Success retval['response_code'] = 200 # Parse the JSON response - retval['data'] = Crack::JSON.parse(res) + retval['data'] = JSON.parse(res) # Rate limit headers if (res.headers[:x_ratelimit_limit]) retval['rate_limit'] = res.headers[:x_ratelimit_limit] end @@ -59,10 +59,10 @@ rescue RestClient::ExceptionWithResponse => err # Set the response code retval['response_code'] = err.http_code # And set the data - retval['data'] = Crack::JSON.parse(err.response) + retval['data'] = JSON.parse(err.response) end retval end