Methods

Oj

Optimized JSON (Oj), as the name implies was written to provide speed optimized JSON handling.

Oj has several dump or serialization modes which control how Objects are converted to JSON. These modes are set with the :mode option in either the default options or as one of the options to the dump() method.

Constants

VERSION

Current version of the module.

Public Class Methods

mimic_loaded(mimic_paths=[]) click to toggle source
# File lib/oj/mimic.rb, line 4
def self.mimic_loaded(mimic_paths=[])
  $LOAD_PATH.each do |d|
    next unless File.exist?(d)
    offset = d.size() + 1
    Dir.glob(File.join(d, '**', '*.rb')).each do |file|
      next if file[offset..-1] !~ /^json[\/\\\.]{1}/
      $LOADED_FEATURES << file unless $LOADED_FEATURES.include?(file)
    end
  end
  mimic_paths.each { |p| $LOADED_FEATURES << p }
  $LOADED_FEATURES << 'json' unless $LOADED_FEATURES.include?('json')
end

[Validate]

Generated with the Darkfish Rdoc Generator 2.