multi_json 1.12.2 → 1.13.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: e41c68668d3cadb98cd4ceb6ab0b5e9cf7f6dc4c
4
- data.tar.gz: b9bfdd33477711d354185017e45f08466dadeba5
3
+ metadata.gz: acf4415bd293a886827ea651745a0cd55adc592d
4
+ data.tar.gz: f5dbf9564d868327d4b8e1278c09afaa3cf233e2
5
5
  SHA512:
6
- metadata.gz: 8a3b5227ce0fb04cc4215e83aa6fb7f7946a480a08f02befb76485d823d84f8217afdd176702e7e14d59ed652811b4d9c0acc79ec17403d31fd3c489034f1ae4
7
- data.tar.gz: 79fc9ccf104b8bd2dde8e3881c7b408b48ec83c0ec84a1cd6f55dc7c10072fcaf200d8325770af8214f7f5576a907add9dedd2b3f80f490684ac126802f1eee9
6
+ metadata.gz: 75d3a312e06fb34780a63a12faf55c223f256eac7ba88a6543c0b092bfe44c4c73231ae204cc3f3791371f12461034ac62f3196f7491a8e5401e0374ecbe25d1
7
+ data.tar.gz: e47aaee606387a9e1baa52dd446f2a4d556ffd7bb27a33e7fbbf180930216290584d2537cd37f33f3c13da172152e0859e4a9d43be8bb09b171a8f56bd26de48
Binary file
data.tar.gz.sig CHANGED
Binary file
data/README.md CHANGED
@@ -5,11 +5,6 @@
5
5
  [![Dependency Status](http://img.shields.io/gemnasium/intridea/multi_json.svg)][gemnasium]
6
6
  [![Code Climate](http://img.shields.io/codeclimate/github/intridea/multi_json.svg)][codeclimate]
7
7
 
8
- [gem]: https://rubygems.org/gems/multi_json
9
- [travis]: http://travis-ci.org/intridea/multi_json
10
- [gemnasium]: https://gemnasium.com/intridea/multi_json
11
- [codeclimate]: https://codeclimate.com/github/intridea/multi_json
12
-
13
8
  Lots of Ruby libraries parse JSON and everyone has their favorite JSON coder.
14
9
  Instead of choosing a single JSON coder and forcing users of your library to be
15
10
  stuck with it, you can use MultiJSON instead, which will simply choose the
@@ -51,17 +46,15 @@ load any. When loading, libraries are ordered by speed. First Oj, then Yajl,
51
46
  then the JSON gem, then JSON pure. If no other JSON library is available,
52
47
  MultiJSON falls back to [OkJson][], a simple, vendorable JSON parser.
53
48
 
54
- [okjson]: https://github.com/kr/okjson
55
-
56
49
  ## Supported JSON Engines
57
50
 
58
- * [Oj](https://github.com/ohler55/oj) Optimized JSON by Peter Ohler
59
- * [Yajl](https://github.com/brianmario/yajl-ruby) Yet Another JSON Library by Brian Lopez
60
- * [JSON](https://github.com/flori/json) The default JSON gem with C-extensions (ships with Ruby 1.9)
61
- * [JSON Pure](https://github.com/flori/json) A Ruby variant of the JSON gem
62
- * [NSJSONSerialization](https://developer.apple.com/library/ios/#documentation/Foundation/Reference/NSJSONSerialization_Class/Reference/Reference.html) Wrapper for Apple's NSJSONSerialization in the Cocoa Framework (MacRuby only)
63
- * [gson.rb](https://github.com/avsej/gson.rb) A Ruby wrapper for google-gson library (JRuby only)
64
- * [JrJackson](https://github.com/guyboertje/jrjackson) JRuby wrapper for Jackson (JRuby only)
51
+ * [Oj][oj] Optimized JSON by Peter Ohler
52
+ * [Yajl][yajl] Yet Another JSON Library by Brian Lopez
53
+ * [JSON][json-gem] The default JSON gem with C-extensions (ships with Ruby 1.9+)
54
+ * [JSON Pure][json-gem] A Ruby variant of the JSON gem
55
+ * [NSJSONSerialization][nsjson] Wrapper for Apple's NSJSONSerialization in the Cocoa Framework (MacRuby only)
56
+ * [gson.rb][gson] A Ruby wrapper for google-gson library (JRuby only)
57
+ * [JrJackson][jrjackson] JRuby wrapper for Jackson (JRuby only)
65
58
  * [OkJson][okjson] A simple, vendorable JSON parser
66
59
 
67
60
  ## Supported Ruby Versions
@@ -72,18 +65,14 @@ implementations:
72
65
  * Ruby 1.9.2
73
66
  * Ruby 1.9.3
74
67
  * Ruby 2.0.0
75
- * Ruby 2.1
76
- * Ruby 2.2.4
77
- * Ruby 2.3.1
78
- * Ruby 2.4.0
68
+ * Ruby 2.1.10
69
+ * Ruby 2.2.9
70
+ * Ruby 2.4.3
71
+ * Ruby 2.5.0
79
72
  * [JRuby][]
80
73
  * [Rubinius][]
81
74
  * [MacRuby][] (not tested on Travis CI)
82
75
 
83
- [jruby]: http://www.jruby.org/
84
- [rubinius]: http://rubini.us/
85
- [macruby]: http://www.macruby.org/
86
-
87
76
  If something doesn't work in one of these implementations, it's a bug.
88
77
 
89
78
  This library may inadvertently work (or seem to work) on other Ruby
@@ -112,11 +101,25 @@ Constraint][pvc] with two digits of precision. For example:
112
101
  spec.add_dependency 'multi_json', '~> 1.0'
113
102
  ```
114
103
 
115
- [semver]: http://semver.org/
116
- [pvc]: http://docs.rubygems.org/read/chapter/16#page74
117
-
118
104
  ## Copyright
119
- Copyright (c) 2010-2013 Michael Bleigh, Josh Kalderimis, Erik Michaels-Ober,
105
+ Copyright (c) 2010-2018 Michael Bleigh, Josh Kalderimis, Erik Michaels-Ober,
120
106
  and Pavel Pravosud. See [LICENSE][] for details.
121
107
 
108
+ [codeclimate]: https://codeclimate.com/github/intridea/multi_json
109
+ [gem]: https://rubygems.org/gems/multi_json
110
+ [gemnasium]: https://gemnasium.com/intridea/multi_json
111
+ [gson]: https://github.com/avsej/gson.rb
112
+ [jrjackson]: https://github.com/guyboertje/jrjackson
113
+ [jruby]: http://www.jruby.org/
114
+ [json-gem]: https://github.com/flori/json
115
+ [json-pure]: https://github.com/flori/json
122
116
  [license]: LICENSE.md
117
+ [macruby]: http://www.macruby.org/
118
+ [nsjson]: https://developer.apple.com/library/ios/#documentation/Foundation/Reference/NSJSONSerialization_Class/Reference/Reference.html
119
+ [oj]: https://github.com/ohler55/oj
120
+ [okjson]: https://github.com/kr/okjson
121
+ [pvc]: http://docs.rubygems.org/read/chapter/16#page74
122
+ [rubinius]: http://rubini.us/
123
+ [semver]: http://semver.org/
124
+ [travis]: http://travis-ci.org/intridea/multi_json
125
+ [yajl]: https://github.com/brianmario/yajl-ruby
@@ -8,7 +8,25 @@ module MultiJson
8
8
  defaults :load, :mode => :strict, :symbolize_keys => false
9
9
  defaults :dump, :mode => :compat, :time_format => :ruby, :use_to_json => true
10
10
 
11
- ParseError = defined?(::Oj::ParseError) ? ::Oj::ParseError : SyntaxError
11
+ # In certain cases OJ gem may throw JSON::ParserError exception instead
12
+ # of its own class. Also, we can't expect ::JSON::ParserError and
13
+ # ::Oj::ParseError to always be defined, since it's often not the case.
14
+ # Because of this, we can't reference those classes directly and have to
15
+ # do string comparison instead. This will not catch subclasses, but it
16
+ # shouldn't be a problem since the library is not known to be using it
17
+ # (at least for now).
18
+ class ParseError < ::SyntaxError
19
+ WRAPPED_CLASSES = %w[Oj::ParseError JSON::ParserError].to_set.freeze
20
+
21
+ def self.===(exception)
22
+ case exception
23
+ when ::SyntaxError
24
+ true
25
+ else
26
+ WRAPPED_CLASSES.include?(exception.class.to_s)
27
+ end
28
+ end
29
+ end
12
30
 
13
31
  def load(string, options = {})
14
32
  options[:symbol_keys] = options[:symbolize_keys]
@@ -1,8 +1,8 @@
1
1
  module MultiJson
2
2
  class Version
3
3
  MAJOR = 1 unless defined? MultiJson::Version::MAJOR
4
- MINOR = 12 unless defined? MultiJson::Version::MINOR
5
- PATCH = 2 unless defined? MultiJson::Version::PATCH
4
+ MINOR = 13 unless defined? MultiJson::Version::MINOR
5
+ PATCH = 0 unless defined? MultiJson::Version::PATCH
6
6
  PRE = nil unless defined? MultiJson::Version::PRE
7
7
 
8
8
  class << self
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: multi_json
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.12.2
4
+ version: 1.13.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Michael Bleigh
@@ -13,27 +13,27 @@ bindir: bin
13
13
  cert_chain:
14
14
  - |
15
15
  -----BEGIN CERTIFICATE-----
16
- MIIDcDCCAligAwIBAgIBATANBgkqhkiG9w0BAQUFADA/MQ4wDAYDVQQDDAVwYXZl
17
- bDEYMBYGCgmSJomT8ixkAR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S3o/vLdnHKeoWwJs
30
+ kVIWEQgaUVabD+bkdS9s5icM3ox2XxRJd9uDW62WvFHFZzbJiLkop9XvnnAgMlGy
31
+ O4oewvfU2u5E1kTY9nGnnTngKaw0Zh1VN6yexwv1FIOBXAaAYclVTfbEEzBqHLK/
32
+ 80mUboJWH2DXpWM6JCwGR7Blt2Zsfp172JjwW75/VQwPndKZDCkjTN/7MbHgvUQR
33
+ X7myOZyY2pB6iYleyWB68zhOnqbtf/3ZYS8vfSd1M5qt8TzmgR4VdbogpEr4wRV6
34
+ KG+kpw==
35
35
  -----END CERTIFICATE-----
36
- date: 2017-09-05 00:00:00.000000000 Z
36
+ date: 2018-01-08 00:00:00.000000000 Z
37
37
  dependencies:
38
38
  - !ruby/object:Gem::Dependency
39
39
  name: bundler
@@ -103,9 +103,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
103
103
  version: 1.3.5
104
104
  requirements: []
105
105
  rubyforge_project:
106
- rubygems_version: 2.6.13
106
+ rubygems_version: 2.6.14
107
107
  signing_key:
108
108
  specification_version: 4
109
109
  summary: A common interface to multiple JSON libraries.
110
110
  test_files: []
111
- has_rdoc:
metadata.gz.sig CHANGED
Binary file