替代雜湊到 JSON
require 'json'
document = JSON 'test' => 23 # => "{\"test\":23}"
要麼
require 'json'
document = JSON['test' => 23] # => "{\"test\":23}"
require 'json'
document = JSON 'test' => 23 # => "{\"test\":23}"
要麼
require 'json'
document = JSON['test' => 23] # => "{\"test\":23}"