Permalink
Browse files

start using MultiJson

  • Loading branch information...
1 parent 98da622 commit bc23373dbdd4c4de5e9fd27018d11037f54c2934 @shime shime committed Jan 3, 2014
Showing with 4 additions and 3 deletions.
  1. +1 −1 airbrake.gemspec
  2. +3 −2 lib/airbrake/notice.rb
View
@@ -14,7 +14,7 @@ Gem::Specification.new do |s|
s.test_files = Dir.glob("{test,spec,features}/**/*")
s.add_runtime_dependency("builder")
- s.add_runtime_dependency("json")
+ s.add_runtime_dependency("multi_json")
s.add_development_dependency("bourne", "~> 1.4.0")
s.add_development_dependency("cucumber-rails","~> 1.1.1")
View
@@ -1,5 +1,6 @@
require 'builder'
require 'socket'
+require 'multi_json'
module Airbrake
class Notice
@@ -202,7 +203,7 @@ def to_xml
end
def to_json
- {
+ MultiJson.dump({
'notifier' => {
'name' => 'airbrake',
'version' => Airbrake::VERSION,
@@ -239,7 +240,7 @@ def to_json
hash['environment'] = cgi_data unless cgi_data.empty?
hash['params'] = parameters unless parameters.empty?
hash['session'] = session_data unless session_data.empty?
- end.to_json
+ end)
end
# Determines if this notice should be ignored

2 comments on commit bc23373

Should we actually go the other way? as MultiJSON is not supported anymore?

Contributor

dvdplm replied Jan 17, 2014

Indeed, maybe we should. :/

Please sign in to comment.