Flowdock
method

load

Importance_2
load(source, proc = nil, options = {}) public

Load a ruby data structure from a JSON source and return it. A source can either be a string-like object, an IO-like object, or an object responding to the read method. If proc was given, it will be called with any nested Ruby object as an argument recursively in depth first order. To modify the default options pass in the optional options argument as well.

BEWARE: This method is meant to serialise data from trusted user input, like from your own database server or clients under your control, it could be dangerous to allow untrusted users to pass JSON sources into it. The default options for the parser can be changed via the load_default_options method.

This method is part of the implementation of the load/dump interface of Marshal and YAML.

Show source
Register or log in to add new notes.