json2-rails 1.0.0 → 1.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/README.md +4 -4
- data/lib/json2-rails/version.rb +1 -1
- data/vendor/assets/javascripts/json.js +15 -12
- data/vendor/assets/javascripts/json2.js +15 -12
- metadata +7 -7
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: f6034d542f0472a656d48daf723899add57970f1
|
4
|
+
data.tar.gz: 8384204950037f8acb2f6b1c4beb9ca83b6543f3
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 43870c115c6a6d96f4f9cb58772b3d72223f422e827fe210fdd2e1a1539e313b9d75a9b3f6ff4350f62725da8ba7a9b4006c0e53b13277560d3e7b9f54cb2fc3
|
7
|
+
data.tar.gz: 9fb5afae4765a62767beec10473a1fa7373d1e839beeba1bf10e5efeb17af1743dcf5bb9b7815248338a0d72323344213426596840230871787b1a03a8238d0a
|
data/README.md
CHANGED
@@ -19,10 +19,10 @@ Add the following to your `app/assets/javascripts/application.js`:
|
|
19
19
|
|
20
20
|
//= require json2
|
21
21
|
|
22
|
-
//= require cycle
|
22
|
+
//= require cycle
|
23
23
|
|
24
|
-
//= require json
|
24
|
+
//= require json
|
25
25
|
|
26
|
-
//= require json_parse
|
26
|
+
//= require json_parse
|
27
27
|
|
28
|
-
//= require json_parse_state
|
28
|
+
//= require json_parse_state
|
data/lib/json2-rails/version.rb
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
/*
|
2
2
|
json.js
|
3
|
-
|
3
|
+
2014-02-04
|
4
4
|
|
5
5
|
Public Domain
|
6
6
|
|
@@ -229,19 +229,11 @@ if (typeof JSON !== 'object') {
|
|
229
229
|
};
|
230
230
|
}
|
231
231
|
|
232
|
-
var cx
|
233
|
-
escapable
|
232
|
+
var cx,
|
233
|
+
escapable,
|
234
234
|
gap,
|
235
235
|
indent,
|
236
|
-
meta
|
237
|
-
'\b': '\\b',
|
238
|
-
'\t': '\\t',
|
239
|
-
'\n': '\\n',
|
240
|
-
'\f': '\\f',
|
241
|
-
'\r': '\\r',
|
242
|
-
'"' : '\\"',
|
243
|
-
'\\': '\\\\'
|
244
|
-
},
|
236
|
+
meta,
|
245
237
|
rep;
|
246
238
|
|
247
239
|
|
@@ -392,6 +384,16 @@ if (typeof JSON !== 'object') {
|
|
392
384
|
// If the JSON object does not yet have a stringify method, give it one.
|
393
385
|
|
394
386
|
if (typeof JSON.stringify !== 'function') {
|
387
|
+
escapable = /[\\\"\x00-\x1f\x7f-\x9f\u00ad\u0600-\u0604\u070f\u17b4\u17b5\u200c-\u200f\u2028-\u202f\u2060-\u206f\ufeff\ufff0-\uffff]/g;
|
388
|
+
meta = { // table of character substitutions
|
389
|
+
'\b': '\\b',
|
390
|
+
'\t': '\\t',
|
391
|
+
'\n': '\\n',
|
392
|
+
'\f': '\\f',
|
393
|
+
'\r': '\\r',
|
394
|
+
'"' : '\\"',
|
395
|
+
'\\': '\\\\'
|
396
|
+
};
|
395
397
|
JSON.stringify = function (value, replacer, space) {
|
396
398
|
|
397
399
|
// The stringify method takes a value and an optional replacer, and an optional
|
@@ -439,6 +441,7 @@ if (typeof JSON !== 'object') {
|
|
439
441
|
// If the JSON object does not yet have a parse method, give it one.
|
440
442
|
|
441
443
|
if (typeof JSON.parse !== 'function') {
|
444
|
+
cx = /[\u0000\u00ad\u0600-\u0604\u070f\u17b4\u17b5\u200c-\u200f\u2028-\u202f\u2060-\u206f\ufeff\ufff0-\uffff]/g;
|
442
445
|
JSON.parse = function (text, reviver) {
|
443
446
|
|
444
447
|
// The parse method takes a text and an optional reviver function, and returns
|
@@ -1,6 +1,6 @@
|
|
1
1
|
/*
|
2
2
|
json2.js
|
3
|
-
|
3
|
+
2014-02-04
|
4
4
|
|
5
5
|
Public Domain.
|
6
6
|
|
@@ -192,19 +192,11 @@ if (typeof JSON !== 'object') {
|
|
192
192
|
};
|
193
193
|
}
|
194
194
|
|
195
|
-
var cx
|
196
|
-
escapable
|
195
|
+
var cx,
|
196
|
+
escapable,
|
197
197
|
gap,
|
198
198
|
indent,
|
199
|
-
meta
|
200
|
-
'\b': '\\b',
|
201
|
-
'\t': '\\t',
|
202
|
-
'\n': '\\n',
|
203
|
-
'\f': '\\f',
|
204
|
-
'\r': '\\r',
|
205
|
-
'"' : '\\"',
|
206
|
-
'\\': '\\\\'
|
207
|
-
},
|
199
|
+
meta,
|
208
200
|
rep;
|
209
201
|
|
210
202
|
|
@@ -356,6 +348,16 @@ if (typeof JSON !== 'object') {
|
|
356
348
|
// If the JSON object does not yet have a stringify method, give it one.
|
357
349
|
|
358
350
|
if (typeof JSON.stringify !== 'function') {
|
351
|
+
escapable = /[\\\"\x00-\x1f\x7f-\x9f\u00ad\u0600-\u0604\u070f\u17b4\u17b5\u200c-\u200f\u2028-\u202f\u2060-\u206f\ufeff\ufff0-\uffff]/g;
|
352
|
+
meta = { // table of character substitutions
|
353
|
+
'\b': '\\b',
|
354
|
+
'\t': '\\t',
|
355
|
+
'\n': '\\n',
|
356
|
+
'\f': '\\f',
|
357
|
+
'\r': '\\r',
|
358
|
+
'"' : '\\"',
|
359
|
+
'\\': '\\\\'
|
360
|
+
};
|
359
361
|
JSON.stringify = function (value, replacer, space) {
|
360
362
|
|
361
363
|
// The stringify method takes a value and an optional replacer, and an optional
|
@@ -403,6 +405,7 @@ if (typeof JSON !== 'object') {
|
|
403
405
|
// If the JSON object does not yet have a parse method, give it one.
|
404
406
|
|
405
407
|
if (typeof JSON.parse !== 'function') {
|
408
|
+
cx = /[\u0000\u00ad\u0600-\u0604\u070f\u17b4\u17b5\u200c-\u200f\u2028-\u202f\u2060-\u206f\ufeff\ufff0-\uffff]/g;
|
406
409
|
JSON.parse = function (text, reviver) {
|
407
410
|
|
408
411
|
// The parse method takes a text and an optional reviver function, and returns
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: json2-rails
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.
|
4
|
+
version: 1.1.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Maksim Berjoza
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2014-06-04 00:00:00.000000000 Z
|
12
12
|
dependencies: []
|
13
13
|
description: ''
|
14
14
|
email:
|
@@ -17,15 +17,15 @@ executables: []
|
|
17
17
|
extensions: []
|
18
18
|
extra_rdoc_files: []
|
19
19
|
files:
|
20
|
+
- README.md
|
21
|
+
- lib/json2-rails.rb
|
20
22
|
- lib/json2-rails/engine.rb
|
21
23
|
- lib/json2-rails/version.rb
|
22
|
-
- lib/json2-rails.rb
|
23
24
|
- vendor/assets/javascripts/cycle.js
|
24
25
|
- vendor/assets/javascripts/json.js
|
25
26
|
- vendor/assets/javascripts/json2.js
|
26
27
|
- vendor/assets/javascripts/json_parse.js
|
27
28
|
- vendor/assets/javascripts/json_parse_state.js
|
28
|
-
- README.md
|
29
29
|
homepage: https://github.com/torbjon/json2-rails
|
30
30
|
licenses:
|
31
31
|
- MIT
|
@@ -36,17 +36,17 @@ require_paths:
|
|
36
36
|
- lib
|
37
37
|
required_ruby_version: !ruby/object:Gem::Requirement
|
38
38
|
requirements:
|
39
|
-
- -
|
39
|
+
- - ">="
|
40
40
|
- !ruby/object:Gem::Version
|
41
41
|
version: '0'
|
42
42
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
43
43
|
requirements:
|
44
|
-
- -
|
44
|
+
- - ">="
|
45
45
|
- !ruby/object:Gem::Version
|
46
46
|
version: '0'
|
47
47
|
requirements: []
|
48
48
|
rubyforge_project:
|
49
|
-
rubygems_version: 2.
|
49
|
+
rubygems_version: 2.2.2
|
50
50
|
signing_key:
|
51
51
|
specification_version: 4
|
52
52
|
summary: Crockford's json2, json with Rails asset pipeline
|