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 +4 -4
- checksums.yaml.gz.sig +0 -0
- data.tar.gz.sig +0 -0
- data/README.md +29 -26
- data/lib/multi_json/adapters/oj.rb +19 -1
- data/lib/multi_json/version.rb +2 -2
- metadata +22 -23
- metadata.gz.sig +0 -0
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: acf4415bd293a886827ea651745a0cd55adc592d
|
4
|
+
data.tar.gz: f5dbf9564d868327d4b8e1278c09afaa3cf233e2
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 75d3a312e06fb34780a63a12faf55c223f256eac7ba88a6543c0b092bfe44c4c73231ae204cc3f3791371f12461034ac62f3196f7491a8e5401e0374ecbe25d1
|
7
|
+
data.tar.gz: e47aaee606387a9e1baa52dd446f2a4d556ffd7bb27a33e7fbbf180930216290584d2537cd37f33f3c13da172152e0859e4a9d43be8bb09b171a8f56bd26de48
|
checksums.yaml.gz.sig
CHANGED
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]
|
59
|
-
* [Yajl]
|
60
|
-
* [JSON]
|
61
|
-
* [JSON Pure]
|
62
|
-
* [NSJSONSerialization]
|
63
|
-
* [gson.rb]
|
64
|
-
* [JrJackson]
|
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.
|
77
|
-
* Ruby 2.3
|
78
|
-
* Ruby 2.
|
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-
|
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
|
-
|
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]
|
data/lib/multi_json/version.rb
CHANGED
@@ -1,8 +1,8 @@
|
|
1
1
|
module MultiJson
|
2
2
|
class Version
|
3
3
|
MAJOR = 1 unless defined? MultiJson::Version::MAJOR
|
4
|
-
MINOR =
|
5
|
-
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.
|
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
|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VyQGVtYWlsLmNvbTANBgkqhkiG9w0BAQUFAAOCAQEAuDFit+TKy6Z8i02y
|
29
|
+
htEeuNL9ZNVBfmv6Li6AdUKoiCgStjbH0NKaC6eTx+4glHfZS3o/vLdnHKeoWwJs
|
30
|
+
kVIWEQgaUVabD+bkdS9s5icM3ox2XxRJd9uDW62WvFHFZzbJiLkop9XvnnAgMlGy
|
31
|
+
O4oewvfU2u5E1kTY9nGnnTngKaw0Zh1VN6yexwv1FIOBXAaAYclVTfbEEzBqHLK/
|
32
|
+
80mUboJWH2DXpWM6JCwGR7Blt2Zsfp172JjwW75/VQwPndKZDCkjTN/7MbHgvUQR
|
33
|
+
X7myOZyY2pB6iYleyWB68zhOnqbtf/3ZYS8vfSd1M5qt8TzmgR4VdbogpEr4wRV6
|
34
|
+
KG+kpw==
|
35
35
|
-----END CERTIFICATE-----
|
36
|
-
date:
|
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.
|
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
|