Module MultiJson
In: lib/multi_json/version.rb
lib/multi_json/adapters/json_gem.rb
lib/multi_json/adapters/ok_json.rb
lib/multi_json/adapters/json_common.rb
lib/multi_json/adapters/json_pure.rb
lib/multi_json/adapters/nsjsonserialization.rb
lib/multi_json/adapters/oj.rb
lib/multi_json/adapters/yajl.rb
lib/multi_json/vendor/okjson.rb
lib/multi_json.rb

Methods

Classes and Modules

Module MultiJson::Adapters
Module MultiJson::OkJson
Class MultiJson::DecodeError

Constants

VERSION = "1.5.0" unless defined?(MultiJson::VERSION)
REQUIREMENT_MAP = [ ["oj", :oj], ["yajl", :yajl], ["json", :json_gem], ["json/pure", :json_pure]

External Aliases

default_adapter -> default_engine
  :nodoc:
adapter -> engine
  :nodoc:
use -> adapter=
use -> engine=
  :nodoc:
load -> decode
  :nodoc:
dump -> encode
  :nodoc:
with_adapter -> with_engine

Public Class methods

Get the current adapter class.

The default adapter based on what you currently have loaded and installed. First checks to see if any adapters are already loaded, then checks to see which are installed if none are loaded.

Encodes a Ruby object as JSON.

Decode a JSON string into Ruby.

Options

:symbolize_keys :If true, will use symbols instead of strings for the keys.
:adapter :If set, the selected engine will be used just for the call.

Set the JSON parser utilizing a symbol, string, or class. Supported by default are:

  • :oj
  • :json_gem
  • :json_pure
  • :ok_json
  • :yajl
  • :nsjsonserialization (MacRuby only)

[Validate]