rubygemsJSON


Introduction

The json gem for Ruby allows for the parsing and creation of JSON.

Syntax

  • JSON.parse(json_document_string) => returns a Hash of the JSON document
  • JSON.generate(ruby_hash) => returns a JSON document in the form of a String

Parameters

ParameterDetails
json_document_stringA JSON document in the form of a String
ruby_hashAny Hash object