lib/leanback.rb in leanback-0.5.3 vs lib/leanback.rb in leanback-0.5.4

- old
+ new

@@ -1,7 +1,7 @@ require 'rest_client' -require 'json/pure' +require 'multi_json' module Leanback class InvalidDatabaseName < StandardError; end class InvalidDocumentID < StandardError; end class CouchdbException < StandardError @@ -127,13 +127,13 @@ end def address_port "#{@address}:#{@port}" end def parse_json(json_doc) - JSON.parse(json_doc, symbolize_names: true) + MultiJson.load(json_doc, symbolize_names: true) end def generate_json(data) - JSON.generate(data) + MultiJson.dump(data) end def raise_error(exception) if exception.respond_to?('response') response = parse_json(exception.response) rescue exception.response raise(CouchdbException.new(response), response)