oj 3.8.1 → 3.9.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/ext/oj/custom.c +58 -35
- data/ext/oj/extconf.rb +1 -0
- data/ext/oj/object.c +4 -4
- data/ext/oj/oj.c +3 -3
- data/ext/oj/oj.h +2 -2
- data/ext/oj/rails.c +2 -0
- data/ext/oj/resolve.c +3 -3
- data/ext/oj/val_stack.c +9 -9
- data/ext/oj/val_stack.h +9 -9
- data/lib/oj/version.rb +1 -1
- data/pages/Options.md +4 -0
- data/test/foo.rb +8 -154
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: bda4706ea9e50aef4bdfcd1c9708566b573da4e4c9f000ddf12f3e403a821c88
|
4
|
+
data.tar.gz: 56dbfecea94b2c0e43aa4193aed7749e30d55e4c288770a193aac3c57850bea2
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 73176c366166bb1b6fbe0a20501db677679ef7af8aaab547b9dadbba5856370d844f3595b06208a05c9efd9437d6f167298a0c73ef41fed905017a9aa5b2f764
|
7
|
+
data.tar.gz: 3c4731da851590f39cc71bd2cce9fb9e1e987ec22b54e2bfc948f8004d78dcb0b2bde464b784500958352f8dec045ba8e2ce3804769426821c7c03a11d95ce07
|
data/ext/oj/custom.c
CHANGED
@@ -32,6 +32,13 @@ dump_obj_str(VALUE obj, int depth, Out out) {
|
|
32
32
|
oj_code_attrs(obj, attrs, depth, out, Yes == out->opts->create_ok);
|
33
33
|
}
|
34
34
|
|
35
|
+
static void
|
36
|
+
dump_obj_as_str(VALUE obj, int depth, Out out) {
|
37
|
+
volatile VALUE rstr = rb_funcall(obj, oj_to_s_id, 0);
|
38
|
+
const char *str = rb_string_value_ptr((VALUE*)&rstr);
|
39
|
+
|
40
|
+
oj_dump_cstr(str, RSTRING_LEN(rstr), 0, 0, out);
|
41
|
+
}
|
35
42
|
|
36
43
|
static void
|
37
44
|
bigdecimal_dump(VALUE obj, int depth, Out out) {
|
@@ -57,19 +64,23 @@ static ID imag_id = 0;
|
|
57
64
|
|
58
65
|
static void
|
59
66
|
complex_dump(VALUE obj, int depth, Out out) {
|
60
|
-
|
61
|
-
|
62
|
-
|
63
|
-
|
64
|
-
|
65
|
-
|
66
|
-
|
67
|
-
|
68
|
-
|
69
|
-
|
70
|
-
|
67
|
+
if (NULL != out->opts->create_id) {
|
68
|
+
struct _attr attrs[] = {
|
69
|
+
{ "real", 4, Qnil },
|
70
|
+
{ "imag", 4, Qnil },
|
71
|
+
{ NULL, 0, Qnil },
|
72
|
+
};
|
73
|
+
if (0 == real_id) {
|
74
|
+
real_id = rb_intern("real");
|
75
|
+
imag_id = rb_intern("imag");
|
76
|
+
}
|
77
|
+
attrs[0].value = rb_funcall(obj, real_id, 0);
|
78
|
+
attrs[1].value = rb_funcall(obj, imag_id, 0);
|
71
79
|
|
72
|
-
|
80
|
+
oj_code_attrs(obj, attrs, depth, out, Yes == out->opts->create_ok);
|
81
|
+
} else {
|
82
|
+
dump_obj_as_str(obj, depth, out);
|
83
|
+
}
|
73
84
|
}
|
74
85
|
|
75
86
|
static VALUE
|
@@ -193,17 +204,21 @@ openstruct_load(VALUE clas, VALUE args) {
|
|
193
204
|
|
194
205
|
static void
|
195
206
|
range_dump(VALUE obj, int depth, Out out) {
|
196
|
-
|
197
|
-
|
198
|
-
|
199
|
-
|
200
|
-
|
201
|
-
|
202
|
-
|
203
|
-
|
204
|
-
|
207
|
+
if (NULL != out->opts->create_id) {
|
208
|
+
struct _attr attrs[] = {
|
209
|
+
{ "begin", 5, Qnil },
|
210
|
+
{ "end", 3, Qnil },
|
211
|
+
{ "exclude", 7, Qnil },
|
212
|
+
{ NULL, 0, Qnil },
|
213
|
+
};
|
214
|
+
attrs[0].value = rb_funcall(obj, oj_begin_id, 0);
|
215
|
+
attrs[1].value = rb_funcall(obj, oj_end_id, 0);
|
216
|
+
attrs[2].value = rb_funcall(obj, oj_exclude_end_id, 0);
|
205
217
|
|
206
|
-
|
218
|
+
oj_code_attrs(obj, attrs, depth, out, Yes == out->opts->create_ok);
|
219
|
+
} else {
|
220
|
+
dump_obj_as_str(obj, depth, out);
|
221
|
+
}
|
207
222
|
}
|
208
223
|
|
209
224
|
static VALUE
|
@@ -222,19 +237,23 @@ static ID denominator_id = 0;
|
|
222
237
|
|
223
238
|
static void
|
224
239
|
rational_dump(VALUE obj, int depth, Out out) {
|
225
|
-
|
226
|
-
|
227
|
-
|
228
|
-
|
229
|
-
|
230
|
-
|
231
|
-
|
232
|
-
|
233
|
-
|
234
|
-
|
235
|
-
|
240
|
+
if (NULL != out->opts->create_id) {
|
241
|
+
struct _attr attrs[] = {
|
242
|
+
{ "numerator", 9, Qnil },
|
243
|
+
{ "denominator", 11, Qnil },
|
244
|
+
{ NULL, 0, Qnil },
|
245
|
+
};
|
246
|
+
if (0 == numerator_id) {
|
247
|
+
numerator_id = rb_intern("numerator");
|
248
|
+
denominator_id = rb_intern("denominator");
|
249
|
+
}
|
250
|
+
attrs[0].value = rb_funcall(obj, numerator_id, 0);
|
251
|
+
attrs[1].value = rb_funcall(obj, denominator_id, 0);
|
236
252
|
|
237
|
-
|
253
|
+
oj_code_attrs(obj, attrs, depth, out, Yes == out->opts->create_ok);
|
254
|
+
} else {
|
255
|
+
dump_obj_as_str(obj, depth, out);
|
256
|
+
}
|
238
257
|
}
|
239
258
|
|
240
259
|
static VALUE
|
@@ -874,7 +893,11 @@ dump_data(VALUE obj, int depth, Out out, bool as_ok) {
|
|
874
893
|
|
875
894
|
static void
|
876
895
|
dump_regexp(VALUE obj, int depth, Out out, bool as_ok) {
|
877
|
-
|
896
|
+
if (NULL != out->opts->create_id) {
|
897
|
+
dump_obj_str(obj, depth, out);
|
898
|
+
} else {
|
899
|
+
dump_obj_as_str(obj, depth, out);
|
900
|
+
}
|
878
901
|
}
|
879
902
|
|
880
903
|
static void
|
data/ext/oj/extconf.rb
CHANGED
data/ext/oj/object.c
CHANGED
@@ -407,7 +407,7 @@ oj_set_obj_ivar(Val parent, Val kval, VALUE value) {
|
|
407
407
|
ID var_id;
|
408
408
|
ID *slot;
|
409
409
|
|
410
|
-
#
|
410
|
+
#ifdef HAVE_PTHREAD_MUTEX_INIT
|
411
411
|
pthread_mutex_lock(&oj_cache_mutex);
|
412
412
|
#else
|
413
413
|
rb_mutex_lock(oj_cache_mutex);
|
@@ -441,7 +441,7 @@ oj_set_obj_ivar(Val parent, Val kval, VALUE value) {
|
|
441
441
|
}
|
442
442
|
*slot = var_id;
|
443
443
|
}
|
444
|
-
#
|
444
|
+
#ifdef HAVE_PTHREAD_MUTEX_INIT
|
445
445
|
pthread_mutex_unlock(&oj_cache_mutex);
|
446
446
|
#else
|
447
447
|
rb_mutex_unlock(oj_cache_mutex);
|
@@ -665,7 +665,7 @@ end_hash(ParseInfo pi) {
|
|
665
665
|
static void
|
666
666
|
array_append_cstr(ParseInfo pi, const char *str, size_t len, const char *orig) {
|
667
667
|
volatile VALUE rval = Qnil;
|
668
|
-
|
668
|
+
|
669
669
|
if (3 <= len && 0 != pi->circ_array) {
|
670
670
|
if ('i' == str[1]) {
|
671
671
|
long i = read_long(str + 2, len - 2);
|
@@ -694,7 +694,7 @@ array_append_cstr(ParseInfo pi, const char *str, size_t len, const char *orig) {
|
|
694
694
|
static void
|
695
695
|
array_append_num(ParseInfo pi, NumInfo ni) {
|
696
696
|
volatile VALUE rval = oj_num_as_value(ni);
|
697
|
-
|
697
|
+
|
698
698
|
rb_ary_push(stack_peek(&pi->stack)->val, rval);
|
699
699
|
if (Yes == pi->options.trace) {
|
700
700
|
oj_trace_parse_call("append_number", pi, __FILE__, __LINE__, rval);
|
data/ext/oj/oj.c
CHANGED
@@ -149,7 +149,7 @@ static VALUE xss_safe_sym;
|
|
149
149
|
|
150
150
|
rb_encoding *oj_utf8_encoding = 0;
|
151
151
|
|
152
|
-
#
|
152
|
+
#ifdef HAVE_PTHREAD_MUTEX_INIT
|
153
153
|
pthread_mutex_t oj_cache_mutex;
|
154
154
|
#else
|
155
155
|
VALUE oj_cache_mutex = Qnil;
|
@@ -329,7 +329,7 @@ get_def_opts(VALUE self) {
|
|
329
329
|
case AutoDec:
|
330
330
|
default: rb_hash_aset(opts, bigdecimal_load_sym, auto_sym); break;
|
331
331
|
}
|
332
|
-
rb_hash_aset(opts, create_id_sym, (
|
332
|
+
rb_hash_aset(opts, create_id_sym, (NULL == oj_default_options.create_id) ? Qnil : rb_str_new2(oj_default_options.create_id));
|
333
333
|
rb_hash_aset(opts, oj_space_sym, (0 == oj_default_options.dump_opts.after_size) ? Qnil : rb_str_new2(oj_default_options.dump_opts.after_sep));
|
334
334
|
rb_hash_aset(opts, oj_space_before_sym, (0 == oj_default_options.dump_opts.before_size) ? Qnil : rb_str_new2(oj_default_options.dump_opts.before_sep));
|
335
335
|
rb_hash_aset(opts, oj_object_nl_sym, (0 == oj_default_options.dump_opts.hash_size) ? Qnil : rb_str_new2(oj_default_options.dump_opts.hash_nl));
|
@@ -1692,7 +1692,7 @@ Init_oj() {
|
|
1692
1692
|
oj_odd_init();
|
1693
1693
|
oj_mimic_rails_init();
|
1694
1694
|
|
1695
|
-
#
|
1695
|
+
#ifdef HAVE_PTHREAD_MUTEX_INIT
|
1696
1696
|
if (0 != (err = pthread_mutex_init(&oj_cache_mutex, 0))) {
|
1697
1697
|
rb_raise(rb_eException, "failed to initialize a mutex. %s", strerror(err));
|
1698
1698
|
}
|
data/ext/oj/oj.h
CHANGED
@@ -21,7 +21,7 @@ extern "C" {
|
|
21
21
|
#include <stdint.h>
|
22
22
|
#include <stdbool.h>
|
23
23
|
|
24
|
-
#
|
24
|
+
#ifdef HAVE_PTHREAD_MUTEX_INIT
|
25
25
|
#include <pthread.h>
|
26
26
|
#endif
|
27
27
|
#include "cache8.h"
|
@@ -370,7 +370,7 @@ extern bool oj_use_hash_alt;
|
|
370
370
|
extern bool oj_use_array_alt;
|
371
371
|
extern bool string_writer_optimized;
|
372
372
|
|
373
|
-
#
|
373
|
+
#ifdef HAVE_PTHREAD_MUTEX_INIT
|
374
374
|
extern pthread_mutex_t oj_cache_mutex;
|
375
375
|
#else
|
376
376
|
extern VALUE oj_cache_mutex;
|
data/ext/oj/rails.c
CHANGED
@@ -1071,6 +1071,8 @@ rails_set_encoder(VALUE self) {
|
|
1071
1071
|
rb_undef_method(encoding, "use_standard_json_time_format=");
|
1072
1072
|
rb_define_module_function(encoding, "use_standard_json_time_format=", rails_use_standard_json_time_format, 1);
|
1073
1073
|
|
1074
|
+
pv = rb_iv_get(encoding, "@escape_html_entities_in_json");
|
1075
|
+
escape_html = Qtrue == pv;
|
1074
1076
|
rb_undef_method(encoding, "escape_html_entities_in_json=");
|
1075
1077
|
rb_define_module_function(encoding, "escape_html_entities_in_json=", rails_escape_html_entities_in_json, 1);
|
1076
1078
|
|
data/ext/oj/resolve.c
CHANGED
@@ -6,7 +6,7 @@
|
|
6
6
|
#include <stdlib.h>
|
7
7
|
#include <stdio.h>
|
8
8
|
#include <string.h>
|
9
|
-
#
|
9
|
+
#ifdef HAVE_PTHREAD_MUTEX_INIT
|
10
10
|
#include <pthread.h>
|
11
11
|
#endif
|
12
12
|
|
@@ -75,7 +75,7 @@ oj_name2class(ParseInfo pi, const char *name, size_t len, int auto_define, VALUE
|
|
75
75
|
if (No == pi->options.class_cache) {
|
76
76
|
return resolve_classpath(pi, name, len, auto_define, error_class);
|
77
77
|
}
|
78
|
-
#
|
78
|
+
#ifdef HAVE_PTHREAD_MUTEX_INIT
|
79
79
|
pthread_mutex_lock(&oj_cache_mutex);
|
80
80
|
#else
|
81
81
|
rb_mutex_lock(oj_cache_mutex);
|
@@ -85,7 +85,7 @@ oj_name2class(ParseInfo pi, const char *name, size_t len, int auto_define, VALUE
|
|
85
85
|
*slot = clas;
|
86
86
|
}
|
87
87
|
}
|
88
|
-
#
|
88
|
+
#ifdef HAVE_PTHREAD_MUTEX_INIT
|
89
89
|
pthread_mutex_unlock(&oj_cache_mutex);
|
90
90
|
#else
|
91
91
|
rb_mutex_unlock(oj_cache_mutex);
|
data/ext/oj/val_stack.c
CHANGED
@@ -1,21 +1,21 @@
|
|
1
1
|
/* val_stack.c
|
2
2
|
* Copyright (c) 2011, Peter Ohler
|
3
3
|
* All rights reserved.
|
4
|
-
*
|
4
|
+
*
|
5
5
|
* Redistribution and use in source and binary forms, with or without
|
6
6
|
* modification, are permitted provided that the following conditions are met:
|
7
|
-
*
|
7
|
+
*
|
8
8
|
* - Redistributions of source code must retain the above copyright notice, this
|
9
9
|
* list of conditions and the following disclaimer.
|
10
|
-
*
|
10
|
+
*
|
11
11
|
* - Redistributions in binary form must reproduce the above copyright notice,
|
12
12
|
* this list of conditions and the following disclaimer in the documentation
|
13
13
|
* and/or other materials provided with the distribution.
|
14
|
-
*
|
14
|
+
*
|
15
15
|
* - Neither the name of Peter Ohler nor the names of its contributors may be
|
16
16
|
* used to endorse or promote products derived from this software without
|
17
17
|
* specific prior written permission.
|
18
|
-
*
|
18
|
+
*
|
19
19
|
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
|
20
20
|
* AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
21
21
|
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
|
@@ -42,7 +42,7 @@ mark(void *ptr) {
|
|
42
42
|
if (0 == ptr) {
|
43
43
|
return;
|
44
44
|
}
|
45
|
-
#
|
45
|
+
#ifdef HAVE_PTHREAD_MUTEX_INIT
|
46
46
|
pthread_mutex_lock(&stack->mutex);
|
47
47
|
#else
|
48
48
|
rb_mutex_lock(stack->mutex);
|
@@ -66,7 +66,7 @@ mark(void *ptr) {
|
|
66
66
|
}
|
67
67
|
}
|
68
68
|
}
|
69
|
-
#
|
69
|
+
#ifdef HAVE_PTHREAD_MUTEX_INIT
|
70
70
|
pthread_mutex_unlock(&stack->mutex);
|
71
71
|
#else
|
72
72
|
rb_mutex_unlock(stack->mutex);
|
@@ -75,9 +75,9 @@ mark(void *ptr) {
|
|
75
75
|
|
76
76
|
VALUE
|
77
77
|
oj_stack_init(ValStack stack) {
|
78
|
-
#
|
78
|
+
#ifdef HAVE_PTHREAD_MUTEX_INIT
|
79
79
|
int err;
|
80
|
-
|
80
|
+
|
81
81
|
if (0 != (err = pthread_mutex_init(&stack->mutex, 0))) {
|
82
82
|
rb_raise(rb_eException, "failed to initialize a mutex. %s", strerror(err));
|
83
83
|
}
|
data/ext/oj/val_stack.h
CHANGED
@@ -1,21 +1,21 @@
|
|
1
1
|
/* val_stack.h
|
2
2
|
* Copyright (c) 2011, Peter Ohler
|
3
3
|
* All rights reserved.
|
4
|
-
*
|
4
|
+
*
|
5
5
|
* Redistribution and use in source and binary forms, with or without
|
6
6
|
* modification, are permitted provided that the following conditions are met:
|
7
|
-
*
|
7
|
+
*
|
8
8
|
* - Redistributions of source code must retain the above copyright notice, this
|
9
9
|
* list of conditions and the following disclaimer.
|
10
|
-
*
|
10
|
+
*
|
11
11
|
* - Redistributions in binary form must reproduce the above copyright notice,
|
12
12
|
* this list of conditions and the following disclaimer in the documentation
|
13
13
|
* and/or other materials provided with the distribution.
|
14
|
-
*
|
14
|
+
*
|
15
15
|
* - Neither the name of Peter Ohler nor the names of its contributors may be
|
16
16
|
* used to endorse or promote products derived from this software without
|
17
17
|
* specific prior written permission.
|
18
|
-
*
|
18
|
+
*
|
19
19
|
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
|
20
20
|
* AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
21
21
|
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
|
@@ -34,7 +34,7 @@
|
|
34
34
|
#include "ruby.h"
|
35
35
|
#include "odd.h"
|
36
36
|
#include <stdint.h>
|
37
|
-
#
|
37
|
+
#ifdef HAVE_PTHREAD_MUTEX_INIT
|
38
38
|
#include <pthread.h>
|
39
39
|
#endif
|
40
40
|
|
@@ -72,7 +72,7 @@ typedef struct _valStack {
|
|
72
72
|
Val head; // current stack
|
73
73
|
Val end; // stack end
|
74
74
|
Val tail; // pointer to one past last element name on stack
|
75
|
-
#
|
75
|
+
#ifdef HAVE_PTHREAD_MUTEX_INIT
|
76
76
|
pthread_mutex_t mutex;
|
77
77
|
#else
|
78
78
|
VALUE mutex;
|
@@ -110,7 +110,7 @@ stack_push(ValStack stack, VALUE val, ValNext next) {
|
|
110
110
|
} else {
|
111
111
|
REALLOC_N(head, struct _val, len + STACK_INC);
|
112
112
|
}
|
113
|
-
#
|
113
|
+
#ifdef HAVE_PTHREAD_MUTEX_INIT
|
114
114
|
pthread_mutex_lock(&stack->mutex);
|
115
115
|
#else
|
116
116
|
rb_mutex_lock(stack->mutex);
|
@@ -118,7 +118,7 @@ stack_push(ValStack stack, VALUE val, ValNext next) {
|
|
118
118
|
stack->head = head;
|
119
119
|
stack->tail = stack->head + toff;
|
120
120
|
stack->end = stack->head + len + STACK_INC;
|
121
|
-
#
|
121
|
+
#ifdef HAVE_PTHREAD_MUTEX_INIT
|
122
122
|
pthread_mutex_unlock(&stack->mutex);
|
123
123
|
#else
|
124
124
|
rb_mutex_unlock(stack->mutex);
|
data/lib/oj/version.rb
CHANGED
data/pages/Options.md
CHANGED
@@ -89,6 +89,10 @@ with the key.
|
|
89
89
|
The :create_id option specifies that key is used for dumping and loading when
|
90
90
|
specifying the class for an encoded object. The default is `json_create`.
|
91
91
|
|
92
|
+
In the `:custom` mode setting the `:create_id` to nil will cause Complex,
|
93
|
+
Rational, Range, and Regexp to be output as strings instead of as JSON
|
94
|
+
objects.
|
95
|
+
|
92
96
|
### :empty_string [Boolean]
|
93
97
|
|
94
98
|
If true an empty or all whitespace input will not raise an Exception. The
|
data/test/foo.rb
CHANGED
@@ -7,161 +7,15 @@ $oj_dir = File.dirname(File.expand_path(File.dirname(__FILE__)))
|
|
7
7
|
$: << File.join($oj_dir, dir)
|
8
8
|
end
|
9
9
|
|
10
|
-
#require 'json'
|
11
10
|
require 'oj'
|
11
|
+
require 'active_support'
|
12
|
+
require 'active_support/json'
|
13
|
+
#require 'tracer'
|
12
14
|
|
13
|
-
Oj.
|
15
|
+
Oj::Rails.set_encoder()
|
16
|
+
Oj::Rails.set_decoder()
|
17
|
+
Oj::Rails.optimize()
|
14
18
|
|
15
|
-
|
16
|
-
ab: {
|
17
|
-
cbbb: {
|
18
|
-
tilbeb: [
|
19
|
-
{
|
20
|
-
coob: {
|
21
|
-
uijwts: [
|
22
|
-
{
|
23
|
-
prrrrr: {
|
24
|
-
yakj: "pvebbx",
|
25
|
-
lbhqy: {
|
26
|
-
uhyw: {
|
27
|
-
uijwts: [
|
28
|
-
{
|
29
|
-
jangi: {
|
30
|
-
ubentg7haineued8atnr8w: {
|
31
|
-
abc: "uejdncbncnamnasdasdasdasd",
|
32
|
-
cde: "skfjskdfjskdfjsdkfjsdkfjs"
|
33
|
-
}
|
34
|
-
}
|
35
|
-
}
|
36
|
-
]
|
37
|
-
}
|
38
|
-
}
|
39
|
-
}
|
40
|
-
},
|
41
|
-
{
|
42
|
-
kdncg: {
|
43
|
-
lvbnt8b9ounv: {
|
44
|
-
qk: 9
|
45
|
-
}
|
46
|
-
}
|
47
|
-
}
|
48
|
-
],
|
49
|
-
jenfjbhe: {}
|
50
|
-
}
|
51
|
-
}
|
52
|
-
]
|
53
|
-
}
|
54
|
-
},
|
55
|
-
ijbh: {
|
56
|
-
jsnbrpbnunt: {
|
57
|
-
b88dibalbvp: {
|
58
|
-
mnbvd: "9uhbqlpiev"
|
59
|
-
}
|
60
|
-
},
|
61
|
-
ncnwkl: {
|
62
|
-
ksdfsf: {
|
63
|
-
mjln: "mnklkn"
|
64
|
-
},
|
65
|
-
kbrh: {
|
66
|
-
sdfn83nnalbmgnansdd: {
|
67
|
-
uijwts: {
|
68
|
-
ibha: {
|
69
|
-
uijwts: [
|
70
|
-
{
|
71
|
-
lnrbf: {
|
72
|
-
nbvtmqbhap9ebeb7btnnaw: {
|
73
|
-
ksb: "sdfksdfjsdfsb39242dnasddd",
|
74
|
-
mnm: "1293dsfnsdmfnsdfsd,fmnsd,"
|
75
|
-
}
|
76
|
-
}
|
77
|
-
}
|
78
|
-
]
|
79
|
-
}
|
80
|
-
},
|
81
|
-
kbrh: {
|
82
|
-
bo8libts: {
|
83
|
-
nag40n: {
|
84
|
-
kyen: "sdfasnc92nsn"
|
85
|
-
},
|
86
|
-
kbrh: {
|
87
|
-
nbwyu26snfcbajsdkj8: {
|
88
|
-
uijwts: {
|
89
|
-
mdfnkjsdd: {}
|
90
|
-
},
|
91
|
-
kbrh: {
|
92
|
-
kneahce: {
|
93
|
-
uijwts: {
|
94
|
-
kwnb: {
|
95
|
-
uijwts: [
|
96
|
-
{
|
97
|
-
fhfd: {
|
98
|
-
sfasdnfmasndfamsdnfajsmdf: false
|
99
|
-
}
|
100
|
-
}
|
101
|
-
],
|
102
|
-
asdfsdff: [
|
103
|
-
{
|
104
|
-
cwdf: {
|
105
|
-
sddlkfajsdkfjabskdfjalsdkfjansdkfjf: ""
|
106
|
-
}
|
107
|
-
},
|
108
|
-
{
|
109
|
-
bsdj: {
|
110
|
-
sdfsjdlfkasy8kljsfsdf83jlkjfals: true
|
111
|
-
}
|
112
|
-
}
|
113
|
-
]
|
114
|
-
}
|
115
|
-
},
|
116
|
-
kbrh: {
|
117
|
-
sdfsdfsddfk: {
|
118
|
-
uijwts: {
|
119
|
-
sdfsd: {
|
120
|
-
sdfsadf89mnlrrrqurqwvdnff: {
|
121
|
-
"kj": 8
|
122
|
-
}
|
123
|
-
}
|
124
|
-
},
|
125
|
-
kbrh: {
|
126
|
-
dkdjd: {
|
127
|
-
dfeteu: {
|
128
|
-
sdfd: "sdfasdfjlkjslrsdbb"
|
129
|
-
},
|
130
|
-
kbrh: {
|
131
|
-
sdfskjdfldk: {
|
132
|
-
buqpen: {
|
133
|
-
kjlkj: {
|
134
|
-
sdflskdjfalsdkrjalwkjfsrlfjasdf: {
|
135
|
-
sd: 0
|
136
|
-
}
|
137
|
-
}
|
138
|
-
},
|
139
|
-
kbrh: {
|
140
|
-
sdfksljdlfksdfl: {
|
141
|
-
sdfsdkfjssd: {
|
142
|
-
ksdjf: "sdflsdkfjasdkaufs;ldkfjsdlf",
|
143
|
-
sdfsdfsl: [5]
|
144
|
-
}
|
145
|
-
}
|
146
|
-
}
|
147
|
-
}
|
148
|
-
}
|
149
|
-
}
|
150
|
-
}
|
151
|
-
}
|
152
|
-
}
|
153
|
-
}
|
154
|
-
}
|
155
|
-
}
|
156
|
-
}
|
157
|
-
}
|
158
|
-
}
|
159
|
-
}
|
160
|
-
}
|
161
|
-
}
|
162
|
-
}
|
163
|
-
}
|
19
|
+
#Oj::mimic_JSON
|
164
20
|
|
165
|
-
|
166
|
-
JSON.pretty_generate(obj)
|
167
|
-
#JSON.generate(obj)
|
21
|
+
puts JSON.parse('{"a":1}', symbolize_names: true)
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: oj
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 3.
|
4
|
+
version: 3.9.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Peter Ohler
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2019-
|
11
|
+
date: 2019-08-18 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rake-compiler
|