Class: Parser2BenchmarkExt

Inherits:
Bullshit::RepeatCase
  • Object
show all
Includes:
Parser2BenchmarkCommon
Defined in:
lib/vendor/json_pure/benchmarks/parser2_benchmark.rb

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

Methods included from Parser2BenchmarkCommon

#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

Instance Method Details

#benchmark_parserObject



62
63
64
# File 'lib/vendor/json_pure/benchmarks/parser2_benchmark.rb', line 62

def benchmark_parser
  @result = JSON.parse(@json)
end

#benchmark_parser_symbolicObject



68
69
70
# File 'lib/vendor/json_pure/benchmarks/parser2_benchmark.rb', line 68

def benchmark_parser_symbolic
  @result = JSON.parse(@json, :symbolize_names => true)
end