Class: MultiJson::Adapter

### Home Classes Methods

### In Files

- lib/multi_json/adapter.rb

### Parent

Object

### Methods

- ::defaults
- ::dump
- ::load

### Included Modules

- Singleton

### Class/Module Index

Quicksearch

- MultiJson
- MultiJson::Adapter
- MultiJson::AdapterError
- MultiJson::Adapters
- MultiJson::Adapters::Gson
- MultiJson::Adapters::JrJackson
- MultiJson::Adapters::JsonCommon
- MultiJson::Adapters::JsonGem
- MultiJson::Adapters::JsonPure
- MultiJson::Adapters::Nsjsonserialization
- MultiJson::Adapters::Oj
- MultiJson::Adapters::OkJson
- MultiJson::Adapters::Yajl
- MultiJson::ConvertibleHashKeys
- MultiJson::OkJson
- MultiJson::OkJson::Error
- MultiJson::OkJson::Utf8Error
- MultiJson::Options
- MultiJson::ParseError
- MultiJson::Version

No matching classes.

# MultiJson::Adapter

### Public Class Methods

defaults(action, value) click to toggle source

    # File lib/multi_json/adapter.rb, line 10
    def defaults(action, value)
      metaclass = class << self; self; end

      metaclass.instance_eval do
        define_method("default_#{action}_options"){ value }
      end
    end

dump(object, options={}) click to toggle source

    # File lib/multi_json/adapter.rb, line 24
    def dump(object, options={})
      instance.dump(object, dump_options(options).merge(MultiJson.dump_options(options)).merge!(options))
    end

load(string, options={}) click to toggle source

    # File lib/multi_json/adapter.rb, line 18
    def load(string, options={})
      raise self::ParseError if blank?(string)
      string = string.read if string.respond_to?(:read)
      instance.load(string, load_options(options).merge(MultiJson.load_options(options)).merge!(options))
    end

[Validate]

Generated with the Darkfish Rdoc Generator 2.