mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
* ext/json: Merge json gem 1.5.4+ (2149f4185c598fb97db1).
[Bug #5173] [ruby-core:38866] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@33122 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
2dd9d721ed
commit
b14c060dda
13 changed files with 728 additions and 288 deletions
|
@ -7,13 +7,13 @@
|
|||
#
|
||||
# Built on two universally available structures:
|
||||
# 1. A collection of name/value pairs. Often referred to as an _object_, hash table, record, struct, keyed list, or associative array.
|
||||
# 2. An orderd list of values. More commonly named as an _array_, vector, sequence, or list.
|
||||
# 2. An ordered list of values. More commonly called an _array_, vector, sequence or list.
|
||||
#
|
||||
# To read more about JSON visit: http://json.org
|
||||
#
|
||||
# == Parsing JSON
|
||||
#
|
||||
# To parse a JSON string received by another application, or generated within
|
||||
# To parse a JSON string received by another application or generated within
|
||||
# your existing application:
|
||||
#
|
||||
# require 'json'
|
||||
|
@ -42,8 +42,8 @@
|
|||
# puts {:hello => "goodbye"}.to_json => "{\"hello\":\"goodbye\"}"
|
||||
#
|
||||
# <tt>JSON.generate</tt> only allows objects or arrays to be converted
|
||||
# to JSON syntax. While <tt>to_json</tt> accepts many Ruby classes
|
||||
# even though it only acts a method for serialization:
|
||||
# to JSON syntax. <tt>to_json</tt>, however, accepts many Ruby classes
|
||||
# even though it acts only as a method for serialization:
|
||||
#
|
||||
# require 'json'
|
||||
#
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue