Module: JSONGeneratorCommon
Constant Summary
Constants included
from JSON
JSON::Infinity, JSON::JSON_LOADED, JSON::MAP, JSON::MinusInfinity, JSON::NaN, JSON::UnparserError, JSON::VERSION, JSON::VERSION_ARRAY, JSON::VERSION_BUILD, JSON::VERSION_MAJOR, JSON::VERSION_MINOR
Instance Method Summary
collapse
#generic_reset_method, #setup
Methods included from JSON
[], deep_const_get, dump, fast_generate, generate, iconv, load, parse, parse!, pretty_generate, recurse_proc, swap!, utf8_to_json, utf8_to_json_ascii
#generic_reset_method, #setup
Instance Method Details
#benchmark_generator_ascii ⇒ Object
60
61
62
|
# File 'lib/vendor/json_pure/benchmarks/generator_benchmark.rb', line 60
def benchmark_generator_ascii
@result = JSON.generate(@big, :ascii_only => true)
end
|
#benchmark_generator_fast ⇒ Object
42
43
44
|
# File 'lib/vendor/json_pure/benchmarks/generator_benchmark.rb', line 42
def benchmark_generator_fast
@result = JSON.fast_generate(@big)
end
|
#benchmark_generator_pretty ⇒ Object
54
55
56
|
# File 'lib/vendor/json_pure/benchmarks/generator_benchmark.rb', line 54
def benchmark_generator_pretty
@result = JSON.pretty_generate(@big)
end
|
#benchmark_generator_safe ⇒ Object
48
49
50
|
# File 'lib/vendor/json_pure/benchmarks/generator_benchmark.rb', line 48
def benchmark_generator_safe
@result = JSON.generate(@big)
end
|