json2-rails 1.1.0 → 1.15.05.18
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:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 342143c03ca2a5931bfd0386a5cc13089026e1d3
|
4
|
+
data.tar.gz: 22a78b963952f4b218a6529bbd57326bdca7b3a1
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 8dc5b02f998119a6c0ebc9d231c305d389b0b722470f717ddf44f0ee22441faa40872e5954a0e702a8d740418021e35af4c7595eb046127bf401ec578e0b5963
|
7
|
+
data.tar.gz: 1ae7438a906cb9785073938b96e2b39b2e1024333a3aa4fabf23198bf9f544ef97c3a95cf7a69bc7fb41d90db7ad72cc014af4f93d38cc847b82af8b76e76d31
|
data/lib/json2-rails/version.rb
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
/*
|
2
2
|
cycle.js
|
3
|
-
|
3
|
+
2015-02-25
|
4
4
|
|
5
5
|
Public Domain.
|
6
6
|
|
@@ -13,9 +13,10 @@
|
|
13
13
|
NOT CONTROL.
|
14
14
|
*/
|
15
15
|
|
16
|
-
/*jslint
|
16
|
+
/*jslint eval, for */
|
17
17
|
|
18
|
-
/*
|
18
|
+
/*property
|
19
|
+
$ref, apply, call, decycle, hasOwnProperty, length, prototype, push,
|
19
20
|
retrocycle, stringify, test, toString
|
20
21
|
*/
|
21
22
|
|
@@ -55,9 +56,9 @@ if (typeof JSON.decycle !== 'function') {
|
|
55
56
|
|
56
57
|
if (typeof value === 'object' && value !== null &&
|
57
58
|
!(value instanceof Boolean) &&
|
58
|
-
!(value instanceof Date)
|
59
|
-
!(value instanceof Number)
|
60
|
-
!(value instanceof RegExp)
|
59
|
+
!(value instanceof Date) &&
|
60
|
+
!(value instanceof Number) &&
|
61
|
+
!(value instanceof RegExp) &&
|
61
62
|
!(value instanceof String)) {
|
62
63
|
|
63
64
|
// If the value is an object or array, look to see if we have already
|
@@ -90,7 +91,7 @@ if (typeof JSON.decycle !== 'function') {
|
|
90
91
|
for (name in value) {
|
91
92
|
if (Object.prototype.hasOwnProperty.call(value, name)) {
|
92
93
|
nu[name] = derez(value[name],
|
93
|
-
|
94
|
+
path + '[' + JSON.stringify(name) + ']');
|
94
95
|
}
|
95
96
|
}
|
96
97
|
}
|
@@ -125,8 +126,7 @@ if (typeof JSON.retrocycle !== 'function') {
|
|
125
126
|
// return JSON.retrocycle(JSON.parse(s));
|
126
127
|
// produces an array containing a single element which is the array itself.
|
127
128
|
|
128
|
-
var px =
|
129
|
-
/^\$(?:\[(?:\d+|\"(?:[^\\\"\u0000-\u001f]|\\([\\\"\/bfnrt]|u[0-9a-zA-Z]{4}))*\")\])*$/;
|
129
|
+
var px = /^\$(?:\[(?:\d+|\"(?:[^\\\"\u0000-\u001f]|\\([\\\"\/bfnrt]|u[0-9a-zA-Z]{4}))*\")\])*$/;
|
130
130
|
|
131
131
|
(function rez(value) {
|
132
132
|
|
@@ -1,6 +1,6 @@
|
|
1
1
|
/*
|
2
2
|
json2.js
|
3
|
-
|
3
|
+
2015-05-03
|
4
4
|
|
5
5
|
Public Domain.
|
6
6
|
|
@@ -17,7 +17,9 @@
|
|
17
17
|
|
18
18
|
|
19
19
|
This file creates a global JSON object containing two methods: stringify
|
20
|
-
and parse.
|
20
|
+
and parse. This file is provides the ES5 JSON capability to ES3 systems.
|
21
|
+
If a project might run on IE8 or earlier, then this file should be included.
|
22
|
+
This file does nothing on ES5 systems.
|
21
23
|
|
22
24
|
JSON.stringify(value, replacer, space)
|
23
25
|
value any JavaScript value, usually an object or array.
|
@@ -48,7 +50,9 @@
|
|
48
50
|
Date.prototype.toJSON = function (key) {
|
49
51
|
function f(n) {
|
50
52
|
// Format integers to have at least two digits.
|
51
|
-
return n < 10
|
53
|
+
return n < 10
|
54
|
+
? '0' + n
|
55
|
+
: n;
|
52
56
|
}
|
53
57
|
|
54
58
|
return this.getUTCFullYear() + '-' +
|
@@ -94,8 +98,9 @@
|
|
94
98
|
// text is '[\n\t"e",\n\t{\n\t\t"pluribus": "unum"\n\t}\n]'
|
95
99
|
|
96
100
|
text = JSON.stringify([new Date()], function (key, value) {
|
97
|
-
return this[key] instanceof Date
|
98
|
-
'Date(' + this[key] + ')'
|
101
|
+
return this[key] instanceof Date
|
102
|
+
? 'Date(' + this[key] + ')'
|
103
|
+
: value;
|
99
104
|
});
|
100
105
|
// text is '["Date(---current time---)"]'
|
101
106
|
|
@@ -146,10 +151,12 @@
|
|
146
151
|
redistribute.
|
147
152
|
*/
|
148
153
|
|
149
|
-
/*jslint
|
154
|
+
/*jslint
|
155
|
+
eval, for, this
|
156
|
+
*/
|
150
157
|
|
151
|
-
/*
|
152
|
-
call, charCodeAt, getUTCDate, getUTCFullYear, getUTCHours,
|
158
|
+
/*property
|
159
|
+
JSON, apply, call, charCodeAt, getUTCDate, getUTCFullYear, getUTCHours,
|
153
160
|
getUTCMinutes, getUTCMonth, getUTCSeconds, hasOwnProperty, join,
|
154
161
|
lastIndex, length, parse, prototype, push, replace, slice, stringify,
|
155
162
|
test, toJSON, toString, valueOf
|
@@ -165,10 +172,23 @@ if (typeof JSON !== 'object') {
|
|
165
172
|
|
166
173
|
(function () {
|
167
174
|
'use strict';
|
175
|
+
|
176
|
+
var rx_one = /^[\],:{}\s]*$/,
|
177
|
+
rx_two = /\\(?:["\\\/bfnrt]|u[0-9a-fA-F]{4})/g,
|
178
|
+
rx_three = /"[^"\\\n\r]*"|true|false|null|-?\d+(?:\.\d*)?(?:[eE][+\-]?\d+)?/g,
|
179
|
+
rx_four = /(?:^|:|,)(?:\s*\[)+/g,
|
180
|
+
rx_escapable = /[\\\"\u0000-\u001f\u007f-\u009f\u00ad\u0600-\u0604\u070f\u17b4\u17b5\u200c-\u200f\u2028-\u202f\u2060-\u206f\ufeff\ufff0-\uffff]/g,
|
181
|
+
rx_dangerous = /[\u0000\u00ad\u0600-\u0604\u070f\u17b4\u17b5\u200c-\u200f\u2028-\u202f\u2060-\u206f\ufeff\ufff0-\uffff]/g;
|
168
182
|
|
169
183
|
function f(n) {
|
170
184
|
// Format integers to have at least two digits.
|
171
|
-
return n < 10
|
185
|
+
return n < 10
|
186
|
+
? '0' + n
|
187
|
+
: n;
|
188
|
+
}
|
189
|
+
|
190
|
+
function this_value() {
|
191
|
+
return this.valueOf();
|
172
192
|
}
|
173
193
|
|
174
194
|
if (typeof Date.prototype.toJSON !== 'function') {
|
@@ -176,25 +196,21 @@ if (typeof JSON !== 'object') {
|
|
176
196
|
Date.prototype.toJSON = function () {
|
177
197
|
|
178
198
|
return isFinite(this.valueOf())
|
179
|
-
? this.getUTCFullYear()
|
180
|
-
|
181
|
-
|
182
|
-
|
183
|
-
|
184
|
-
|
199
|
+
? this.getUTCFullYear() + '-' +
|
200
|
+
f(this.getUTCMonth() + 1) + '-' +
|
201
|
+
f(this.getUTCDate()) + 'T' +
|
202
|
+
f(this.getUTCHours()) + ':' +
|
203
|
+
f(this.getUTCMinutes()) + ':' +
|
204
|
+
f(this.getUTCSeconds()) + 'Z'
|
185
205
|
: null;
|
186
206
|
};
|
187
207
|
|
188
|
-
|
189
|
-
|
190
|
-
|
191
|
-
return this.valueOf();
|
192
|
-
};
|
208
|
+
Boolean.prototype.toJSON = this_value;
|
209
|
+
Number.prototype.toJSON = this_value;
|
210
|
+
String.prototype.toJSON = this_value;
|
193
211
|
}
|
194
212
|
|
195
|
-
var
|
196
|
-
escapable,
|
197
|
-
gap,
|
213
|
+
var gap,
|
198
214
|
indent,
|
199
215
|
meta,
|
200
216
|
rep;
|
@@ -207,13 +223,15 @@ if (typeof JSON !== 'object') {
|
|
207
223
|
// Otherwise we must also replace the offending characters with safe escape
|
208
224
|
// sequences.
|
209
225
|
|
210
|
-
|
211
|
-
return
|
212
|
-
|
213
|
-
|
214
|
-
|
215
|
-
|
216
|
-
|
226
|
+
rx_escapable.lastIndex = 0;
|
227
|
+
return rx_escapable.test(string)
|
228
|
+
? '"' + string.replace(rx_escapable, function (a) {
|
229
|
+
var c = meta[a];
|
230
|
+
return typeof c === 'string'
|
231
|
+
? c
|
232
|
+
: '\\u' + ('0000' + a.charCodeAt(0).toString(16)).slice(-4);
|
233
|
+
}) + '"'
|
234
|
+
: '"' + string + '"';
|
217
235
|
}
|
218
236
|
|
219
237
|
|
@@ -253,7 +271,9 @@ if (typeof JSON !== 'object') {
|
|
253
271
|
|
254
272
|
// JSON numbers must be finite. Encode non-finite numbers as null.
|
255
273
|
|
256
|
-
return isFinite(value)
|
274
|
+
return isFinite(value)
|
275
|
+
? String(value)
|
276
|
+
: 'null';
|
257
277
|
|
258
278
|
case 'boolean':
|
259
279
|
case 'null':
|
@@ -299,8 +319,8 @@ if (typeof JSON !== 'object') {
|
|
299
319
|
v = partial.length === 0
|
300
320
|
? '[]'
|
301
321
|
: gap
|
302
|
-
|
303
|
-
|
322
|
+
? '[\n' + gap + partial.join(',\n' + gap) + '\n' + mind + ']'
|
323
|
+
: '[' + partial.join(',') + ']';
|
304
324
|
gap = mind;
|
305
325
|
return v;
|
306
326
|
}
|
@@ -314,7 +334,11 @@ if (typeof JSON !== 'object') {
|
|
314
334
|
k = rep[i];
|
315
335
|
v = str(k, value);
|
316
336
|
if (v) {
|
317
|
-
partial.push(quote(k) + (
|
337
|
+
partial.push(quote(k) + (
|
338
|
+
gap
|
339
|
+
? ': '
|
340
|
+
: ':'
|
341
|
+
) + v);
|
318
342
|
}
|
319
343
|
}
|
320
344
|
}
|
@@ -326,7 +350,11 @@ if (typeof JSON !== 'object') {
|
|
326
350
|
if (Object.prototype.hasOwnProperty.call(value, k)) {
|
327
351
|
v = str(k, value);
|
328
352
|
if (v) {
|
329
|
-
partial.push(quote(k) + (
|
353
|
+
partial.push(quote(k) + (
|
354
|
+
gap
|
355
|
+
? ': '
|
356
|
+
: ':'
|
357
|
+
) + v);
|
330
358
|
}
|
331
359
|
}
|
332
360
|
}
|
@@ -338,8 +366,8 @@ if (typeof JSON !== 'object') {
|
|
338
366
|
v = partial.length === 0
|
339
367
|
? '{}'
|
340
368
|
: gap
|
341
|
-
|
342
|
-
|
369
|
+
? '{\n' + gap + partial.join(',\n' + gap) + '\n' + mind + '}'
|
370
|
+
: '{' + partial.join(',') + '}';
|
343
371
|
gap = mind;
|
344
372
|
return v;
|
345
373
|
}
|
@@ -348,14 +376,13 @@ if (typeof JSON !== 'object') {
|
|
348
376
|
// If the JSON object does not yet have a stringify method, give it one.
|
349
377
|
|
350
378
|
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
379
|
meta = { // table of character substitutions
|
353
380
|
'\b': '\\b',
|
354
381
|
'\t': '\\t',
|
355
382
|
'\n': '\\n',
|
356
383
|
'\f': '\\f',
|
357
384
|
'\r': '\\r',
|
358
|
-
'"'
|
385
|
+
'"': '\\"',
|
359
386
|
'\\': '\\\\'
|
360
387
|
};
|
361
388
|
JSON.stringify = function (value, replacer, space) {
|
@@ -405,7 +432,6 @@ if (typeof JSON !== 'object') {
|
|
405
432
|
// If the JSON object does not yet have a parse method, give it one.
|
406
433
|
|
407
434
|
if (typeof JSON.parse !== 'function') {
|
408
|
-
cx = /[\u0000\u00ad\u0600-\u0604\u070f\u17b4\u17b5\u200c-\u200f\u2028-\u202f\u2060-\u206f\ufeff\ufff0-\uffff]/g;
|
409
435
|
JSON.parse = function (text, reviver) {
|
410
436
|
|
411
437
|
// The parse method takes a text and an optional reviver function, and returns
|
@@ -440,11 +466,11 @@ if (typeof JSON !== 'object') {
|
|
440
466
|
// incorrectly, either silently deleting them, or treating them as line endings.
|
441
467
|
|
442
468
|
text = String(text);
|
443
|
-
|
444
|
-
if (
|
445
|
-
text = text.replace(
|
469
|
+
rx_dangerous.lastIndex = 0;
|
470
|
+
if (rx_dangerous.test(text)) {
|
471
|
+
text = text.replace(rx_dangerous, function (a) {
|
446
472
|
return '\\u' +
|
447
|
-
|
473
|
+
('0000' + a.charCodeAt(0).toString(16)).slice(-4);
|
448
474
|
});
|
449
475
|
}
|
450
476
|
|
@@ -461,10 +487,14 @@ if (typeof JSON !== 'object') {
|
|
461
487
|
// we look to see that the remaining characters are only whitespace or ']' or
|
462
488
|
// ',' or ':' or '{' or '}'. If that is so, then the text is safe for eval.
|
463
489
|
|
464
|
-
if (
|
465
|
-
|
466
|
-
|
467
|
-
.replace(
|
490
|
+
if (
|
491
|
+
rx_one.test(
|
492
|
+
text
|
493
|
+
.replace(rx_two, '@')
|
494
|
+
.replace(rx_three, ']')
|
495
|
+
.replace(rx_four, '')
|
496
|
+
)
|
497
|
+
) {
|
468
498
|
|
469
499
|
// In the third stage we use the eval function to compile the text into a
|
470
500
|
// JavaScript structure. The '{' operator is subject to a syntactic ambiguity
|
@@ -1,6 +1,6 @@
|
|
1
1
|
/*
|
2
2
|
json_parse.js
|
3
|
-
|
3
|
+
2015-05-02
|
4
4
|
|
5
5
|
Public Domain.
|
6
6
|
|
@@ -46,8 +46,11 @@
|
|
46
46
|
NOT CONTROL.
|
47
47
|
*/
|
48
48
|
|
49
|
-
/*
|
50
|
-
|
49
|
+
/*jslint for */
|
50
|
+
|
51
|
+
/*property
|
52
|
+
at, b, call, charAt, f, fromCharCode, hasOwnProperty, message, n, name,
|
53
|
+
prototype, push, r, t, text
|
51
54
|
*/
|
52
55
|
|
53
56
|
var json_parse = (function () {
|
@@ -64,14 +67,14 @@ var json_parse = (function () {
|
|
64
67
|
var at, // The index of the current character
|
65
68
|
ch, // The current character
|
66
69
|
escapee = {
|
67
|
-
'"':
|
70
|
+
'"': '"',
|
68
71
|
'\\': '\\',
|
69
|
-
'/':
|
70
|
-
b:
|
71
|
-
f:
|
72
|
-
n:
|
73
|
-
r:
|
74
|
-
t:
|
72
|
+
'/': '/',
|
73
|
+
b: '\b',
|
74
|
+
f: '\f',
|
75
|
+
n: '\n',
|
76
|
+
r: '\r',
|
77
|
+
t: '\t'
|
75
78
|
},
|
76
79
|
text,
|
77
80
|
|
@@ -80,10 +83,10 @@ var json_parse = (function () {
|
|
80
83
|
// Call error when something is wrong.
|
81
84
|
|
82
85
|
throw {
|
83
|
-
name:
|
86
|
+
name: 'SyntaxError',
|
84
87
|
message: m,
|
85
|
-
at:
|
86
|
-
text:
|
88
|
+
at: at,
|
89
|
+
text: text
|
87
90
|
};
|
88
91
|
},
|
89
92
|
|
@@ -302,7 +305,9 @@ var json_parse = (function () {
|
|
302
305
|
case '-':
|
303
306
|
return number();
|
304
307
|
default:
|
305
|
-
return ch >= '0' && ch <= '9'
|
308
|
+
return ch >= '0' && ch <= '9'
|
309
|
+
? number()
|
310
|
+
: word();
|
306
311
|
}
|
307
312
|
};
|
308
313
|
|
@@ -1,6 +1,6 @@
|
|
1
1
|
/*
|
2
2
|
json_parse_state.js
|
3
|
-
|
3
|
+
2015-05-02
|
4
4
|
|
5
5
|
Public Domain.
|
6
6
|
|
@@ -46,13 +46,13 @@
|
|
46
46
|
NOT CONTROL.
|
47
47
|
*/
|
48
48
|
|
49
|
-
/*jslint
|
49
|
+
/*jslint for */
|
50
50
|
|
51
|
-
/*
|
52
|
-
call, colon, container, exec, f, false, firstavalue,
|
53
|
-
fromCharCode, go, hasOwnProperty, key, length, n, null, ocomma,
|
54
|
-
ovalue, pop, prototype, push, r, replace, slice, state, t, test,
|
55
|
-
|
51
|
+
/*property
|
52
|
+
acomma, avalue, b, call, colon, container, exec, f, false, firstavalue,
|
53
|
+
firstokey, fromCharCode, go, hasOwnProperty, key, length, n, null, ocomma,
|
54
|
+
okey, ovalue, pop, prototype, push, r, replace, slice, state, t, test,
|
55
|
+
true
|
56
56
|
*/
|
57
57
|
|
58
58
|
var json_parse = (function () {
|
@@ -287,8 +287,10 @@ var json_parse = (function () {
|
|
287
287
|
|
288
288
|
// Remove and replace any backslash escapement.
|
289
289
|
|
290
|
-
return text.replace(/\\(?:u(.{4})|([^u]))/g, function (
|
291
|
-
return b
|
290
|
+
return text.replace(/\\(?:u(.{4})|([^u]))/g, function (ignore, b, c) {
|
291
|
+
return b
|
292
|
+
? String.fromCharCode(parseInt(b, 16))
|
293
|
+
: escapes[c];
|
292
294
|
});
|
293
295
|
}
|
294
296
|
|
@@ -297,8 +299,8 @@ var json_parse = (function () {
|
|
297
299
|
// A regular expression is used to extract tokens from the JSON text.
|
298
300
|
// The extraction process is cautious.
|
299
301
|
|
300
|
-
var
|
301
|
-
tx = /^[\
|
302
|
+
var result,
|
303
|
+
tx = /^[\u0020\t\n\r]*(?:([,:\[\]{}]|true|false|null)|(-?\d+(?:\.\d*)?(?:[eE][+\-]?\d+)?)|"((?:[^\r\n\t\\\"]|\\(?:["\\\/trnfb]|u[0-9a-fA-F]{4}))*)")/;
|
302
304
|
|
303
305
|
// Set the starting state.
|
304
306
|
|
@@ -315,37 +317,37 @@ var json_parse = (function () {
|
|
315
317
|
|
316
318
|
// For each token...
|
317
319
|
|
318
|
-
|
319
|
-
|
320
|
-
if (!
|
320
|
+
while (true) {
|
321
|
+
result = tx.exec(source);
|
322
|
+
if (!result) {
|
321
323
|
break;
|
322
324
|
}
|
323
325
|
|
324
|
-
//
|
325
|
-
//
|
326
|
-
//
|
327
|
-
//
|
328
|
-
//
|
326
|
+
// result is the result array from matching the tokenizing regular expression.
|
327
|
+
// result[0] contains everything that matched, including any initial whitespace.
|
328
|
+
// result[1] contains any punctuation that was matched, or true, false, or null.
|
329
|
+
// result[2] contains a matched number, still in string form.
|
330
|
+
// result[3] contains a matched string, without quotes but with escapement.
|
329
331
|
|
330
|
-
if (
|
332
|
+
if (result[1]) {
|
331
333
|
|
332
334
|
// Token: Execute the action for this state and token.
|
333
335
|
|
334
|
-
action[
|
336
|
+
action[result[1]][state]();
|
335
337
|
|
336
|
-
} else if (
|
338
|
+
} else if (result[2]) {
|
337
339
|
|
338
340
|
// Number token: Convert the number string into a number value and execute
|
339
341
|
// the action for this state and number.
|
340
342
|
|
341
|
-
value = +
|
343
|
+
value = +result[2];
|
342
344
|
number[state]();
|
343
345
|
} else {
|
344
346
|
|
345
347
|
// String token: Replace the escapement sequences and execute the action for
|
346
348
|
// this state and string.
|
347
349
|
|
348
|
-
value = debackslashify(
|
350
|
+
value = debackslashify(result[3]);
|
349
351
|
string[state]();
|
350
352
|
}
|
351
353
|
|
@@ -353,7 +355,7 @@ var json_parse = (function () {
|
|
353
355
|
// are tokens. This is a slow process, but it allows the use of ^ matching,
|
354
356
|
// which assures that no illegal tokens slip through.
|
355
357
|
|
356
|
-
source = source.slice(
|
358
|
+
source = source.slice(result[0].length);
|
357
359
|
}
|
358
360
|
|
359
361
|
// If we find a state/token combination that is illegal, then the action will
|
@@ -367,8 +369,10 @@ var json_parse = (function () {
|
|
367
369
|
// remaining source contains anything except whitespace, then we did not have
|
368
370
|
//a well-formed JSON text.
|
369
371
|
|
370
|
-
if (state !== 'ok' || /[^\
|
371
|
-
throw state instanceof SyntaxError
|
372
|
+
if (state !== 'ok' || (/[^\u0020\t\n\r]/.test(source))) {
|
373
|
+
throw state instanceof SyntaxError
|
374
|
+
? state
|
375
|
+
: new SyntaxError('JSON');
|
372
376
|
}
|
373
377
|
|
374
378
|
// If there is a reviver function, we recursively walk the new structure,
|
@@ -377,21 +381,23 @@ var json_parse = (function () {
|
|
377
381
|
// value in an empty key. If there is not a reviver function, we simply return
|
378
382
|
// that value.
|
379
383
|
|
380
|
-
return typeof reviver === 'function'
|
381
|
-
|
382
|
-
|
383
|
-
|
384
|
-
|
385
|
-
|
386
|
-
|
387
|
-
|
388
|
-
|
389
|
-
|
384
|
+
return typeof reviver === 'function'
|
385
|
+
? (function walk(holder, key) {
|
386
|
+
var k, v, value = holder[key];
|
387
|
+
if (value && typeof value === 'object') {
|
388
|
+
for (k in value) {
|
389
|
+
if (Object.prototype.hasOwnProperty.call(value, k)) {
|
390
|
+
v = walk(value, k);
|
391
|
+
if (v !== undefined) {
|
392
|
+
value[k] = v;
|
393
|
+
} else {
|
394
|
+
delete value[k];
|
395
|
+
}
|
390
396
|
}
|
391
397
|
}
|
392
398
|
}
|
393
|
-
|
394
|
-
|
395
|
-
|
399
|
+
return reviver.call(holder, key, value);
|
400
|
+
}({'': value}, ''))
|
401
|
+
: value;
|
396
402
|
};
|
397
403
|
}());
|
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.15.05.18
|
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: 2015-05-18 00:00:00.000000000 Z
|
12
12
|
dependencies: []
|
13
13
|
description: ''
|
14
14
|
email:
|
@@ -46,7 +46,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
46
46
|
version: '0'
|
47
47
|
requirements: []
|
48
48
|
rubyforge_project:
|
49
|
-
rubygems_version: 2.
|
49
|
+
rubygems_version: 2.4.6
|
50
50
|
signing_key:
|
51
51
|
specification_version: 4
|
52
52
|
summary: Crockford's json2, json with Rails asset pipeline
|