Skip to content

Commit

Permalink
Merge pull request #50 from jhund/multi_json
Browse files Browse the repository at this point in the history
Replace Oj with MultiJson for JSON handling

Thanks Jo!
  • Loading branch information
maxdemarzi committed Jul 30, 2012
2 parents 65f6ca9 + 6f60af0 commit 54a232e
Show file tree
Hide file tree
Showing 6 changed files with 15 additions and 15 deletions.
3 changes: 1 addition & 2 deletions Gemfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ PATH
neography (0.0.28)
httparty (>= 0.8.1)
json
oj
multi_json
os
rake (>= 0.8.7)
rubyzip
Expand All @@ -20,7 +20,6 @@ GEM
multi_json (1.3.6)
multi_xml (0.5.1)
net-http-spy (0.2.1)
oj (1.2.9)
os (0.9.6)
rake (0.8.7)
rspec (2.10.0)
Expand Down
4 changes: 2 additions & 2 deletions lib/neography.rb
Original file line number Diff line number Diff line change
Expand Up @@ -18,13 +18,13 @@ def find_and_require_user_defined_code
require 'cgi'
require 'httparty'
require 'json'
require 'oj'
require 'multi_json'
require 'logger'
require 'ostruct'
require 'os'
require 'zip/zipfilesystem'

require 'neography/oj_parser'
require 'neography/multi_json_parser'

require 'neography/config'
require 'neography/rest'
Expand Down
4 changes: 2 additions & 2 deletions lib/neography/config.rb
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,6 @@ class << self; attr_accessor :protocol, :server, :port, :directory, :cypher_path
@authentication = {}
@username = nil
@password = nil
@parser = {:parser => OjParser}
@parser = {:parser => MultiJsonParser}
end
end
end
9 changes: 9 additions & 0 deletions lib/neography/multi_json_parser.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
class MultiJsonParser < HTTParty::Parser

protected

def json
MultiJson.load(body)
end

end
8 changes: 0 additions & 8 deletions lib/neography/oj_parser.rb

This file was deleted.

2 changes: 1 addition & 1 deletion neography.gemspec
Original file line number Diff line number Diff line change
Expand Up @@ -27,5 +27,5 @@ Gem::Specification.new do |s|
s.add_dependency "json"
s.add_dependency "os"
s.add_dependency "rubyzip"
s.add_dependency "oj"
s.add_dependency "multi_json"
end

0 comments on commit 54a232e

Please sign in to comment.