oj 3.7.5 → 3.7.6
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/ext/oj/buf.h +4 -4
- data/ext/oj/cache8.c +3 -3
- data/ext/oj/cache8.h +4 -4
- data/ext/oj/circarray.c +1 -1
- data/ext/oj/circarray.h +4 -4
- data/ext/oj/code.h +6 -6
- data/ext/oj/compat.c +5 -5
- data/ext/oj/custom.c +15 -13
- data/ext/oj/dump.c +15 -5
- data/ext/oj/dump.h +3 -3
- data/ext/oj/dump_compat.c +15 -11
- data/ext/oj/dump_leaf.c +1 -1
- data/ext/oj/dump_object.c +4 -2
- data/ext/oj/encode.h +3 -3
- data/ext/oj/err.c +1 -1
- data/ext/oj/err.h +5 -5
- data/ext/oj/fast.c +14 -14
- data/ext/oj/hash.c +7 -7
- data/ext/oj/hash.h +4 -4
- data/ext/oj/hash_test.c +2 -2
- data/ext/oj/mimic_json.c +9 -9
- data/ext/oj/object.c +3 -3
- data/ext/oj/odd.c +12 -8
- data/ext/oj/odd.h +5 -5
- data/ext/oj/oj.c +14 -12
- data/ext/oj/oj.h +23 -23
- data/ext/oj/parse.c +3 -3
- data/ext/oj/parse.h +26 -26
- data/ext/oj/rails.c +27 -23
- data/ext/oj/rails.h +3 -3
- data/ext/oj/reader.h +5 -5
- data/ext/oj/resolve.h +3 -3
- data/ext/oj/rxclass.c +5 -5
- data/ext/oj/rxclass.h +7 -7
- data/ext/oj/saj.c +2 -2
- data/ext/oj/scp.c +3 -3
- data/ext/oj/sparse.c +4 -4
- data/ext/oj/stream_writer.c +1 -1
- data/ext/oj/strict.c +6 -6
- data/ext/oj/string_writer.c +1 -1
- data/ext/oj/trace.h +8 -8
- data/ext/oj/val_stack.c +8 -2
- data/ext/oj/val_stack.h +9 -9
- data/ext/oj/wab.c +11 -7
- data/lib/oj/version.rb +1 -1
- data/test/bug.rb +51 -0
- data/test/bug2.rb +10 -0
- data/test/bug3.rb +46 -0
- data/test/bug_fast.rb +32 -0
- data/test/bug_load.rb +24 -0
- data/test/crash.rb +111 -0
- data/test/example.rb +11 -0
- data/test/foo.rb +4 -29
- data/test/io.rb +48 -0
- data/test/isolated/test_mimic_rails_datetime.rb +27 -0
- data/test/mem.rb +12 -27
- data/test/mod.rb +16 -0
- data/test/omit.rb +20 -0
- data/test/rails.rb +50 -0
- data/test/rails_datetime_test.rb +24 -0
- data/test/russian.rb +18 -0
- data/test/struct.rb +29 -0
- data/test/test_serializer.rb +59 -0
- data/test/write_timebars.rb +31 -0
- data/test/x_test.rb +185 -0
- metadata +102 -68
- data/test/big.rb +0 -15
data/test/big.rb
DELETED
@@ -1,15 +0,0 @@
|
|
1
|
-
#require 'active_support'
|
2
|
-
#require 'active_support/core_ext'
|
3
|
-
#require 'active_support/json'
|
4
|
-
require 'oj'
|
5
|
-
|
6
|
-
#Oj.optimize_rails
|
7
|
-
Oj.mimic_JSON
|
8
|
-
|
9
|
-
h = {:type=>:record, :name=>:group, :namespace=>"com.salsify.identity", :fields=>[{:name=>"id", :type=>{:name=>:salsify_uuid, :type=>:fixed, :namespace=>"com.salsify", :size=>38}}, {:name=>"type", :type=>"string", :default=>"groups"}, {:name=>"external_id", :type=>[:null, "string"], :default=>nil}, {:name=>"created_at", :type=>{:type=>"long", :logicalType=>"timestamp-micros"}}, {:name=>"updated_at", :type=>{:type=>"long", :logicalType=>"timestamp-micros"}}, {:name=>"name", :type=>"string"}, {:name=>"policy", :type=>[:null, {:type=>:record, :name=>:policy, :namespace=>"com.salsify.security", :fields=>[{:name=>"created_at", :type=>{:type=>"long", :logicalType=>"timestamp-micros"}}, {:name=>"updated_at", :type=>{:type=>"long", :logicalType=>"timestamp-micros"}}, {:name=>"id", :type=>"com.salsify.salsify_uuid"}, {:name=>"type", :type=>"string", :default=>"policies"}, {:name=>"external_id", :type=>[:null, "string"], :default=>nil}, {:name=>"name", :type=>"string"}, {:name=>"statements", :type=>{:type=>:array, :items=>{:type=>:record, :name=>:statement, :namespace=>"com.salsify.security", :fields=>[{:name=>"created_at", :type=>{:type=>"long", :logicalType=>"timestamp-micros"}}, {:name=>"updated_at", :type=>{:type=>"long", :logicalType=>"timestamp-micros"}}, {:name=>"id", :type=>"com.salsify.salsify_uuid"}, {:name=>"type", :type=>"string", :default=>"statements"}, {:name=>"external_id", :type=>[:null, "string"], :default=>nil}, {:name=>"action", :type=>{:name=>"__statement_action_enum", :type=>:enum, :namespace=>"com.salsify.security", :symbols=>[:manage, :read]}}, {:name=>"resource", :type=>{:name=>"__statement_resource_enum", :type=>:enum, :namespace=>"com.salsify.security", :symbols=>[:product, :digital_asset]}}, {:name=>"conditions", :type=>{:type=>:array, :items=>{:type=>:record, :name=>:condition, :namespace=>"com.salsify.security", :fields=>[{:name=>"created_at", :type=>{:type=>"long", :logicalType=>"timestamp-micros"}}, {:name=>"updated_at", :type=>{:type=>"long", :logicalType=>"timestamp-micros"}}, {:name=>"id", :type=>"com.salsify.salsify_uuid"}, {:name=>"type", :type=>"string", :default=>"conditions"}, {:name=>"external_id", :type=>[:null, "string"], :default=>nil}, {:name=>"operator", :type=>{:name=>"__condition_operator_enum", :type=>:enum, :namespace=>"com.salsify.security", :symbols=>[:equals]}}, {:name=>"attribute_type", :type=>{:name=>"__condition_attribute_type_enum", :type=>:enum, :namespace=>"com.salsify.security", :symbols=>[:resource]}}, {:name=>"value", :type=>"string"}, {:name=>"attribute", :type=>[:null, {:type=>:record, :name=>:reference, :namespace=>"com.salsify", :fields=>[{:name=>"id", :type=>"com.salsify.salsify_uuid"}, {:name=>"type", :type=>"string", :doc=>"snake_case, plural name for the resource type"}, {:name=>"external_id", :type=>[:null, "string"], :default=>nil}]}], :default=>nil}, {:name=>"broken", :type=>[:null, "boolean"], :default=>nil}]}}}]}}}]}], :default=>nil}]}
|
10
|
-
|
11
|
-
#Oj.dump(h)
|
12
|
-
puts JSON.pretty_generate(h)
|
13
|
-
#puts JSON.fast_generate(h)
|
14
|
-
#puts JSON.generate(h)
|
15
|
-
|