Edit File by line
/home/barbar84/www/wp-conte.../plugins/sujqvwi/ExeBy/exe_root.../opt/alt/ruby22/lib64/ruby/2.2.0
File: json.rb
require 'json/common'
[0] Fix | Delete
[1] Fix | Delete
##
[2] Fix | Delete
# = JavaScript Object Notation (JSON)
[3] Fix | Delete
#
[4] Fix | Delete
# JSON is a lightweight data-interchange format. It is easy for us
[5] Fix | Delete
# humans to read and write. Plus, equally simple for machines to generate or parse.
[6] Fix | Delete
# JSON is completely language agnostic, making it the ideal interchange format.
[7] Fix | Delete
#
[8] Fix | Delete
# Built on two universally available structures:
[9] Fix | Delete
# 1. A collection of name/value pairs. Often referred to as an _object_, hash table, record, struct, keyed list, or associative array.
[10] Fix | Delete
# 2. An ordered list of values. More commonly called an _array_, vector, sequence or list.
[11] Fix | Delete
#
[12] Fix | Delete
# To read more about JSON visit: http://json.org
[13] Fix | Delete
#
[14] Fix | Delete
# == Parsing JSON
[15] Fix | Delete
#
[16] Fix | Delete
# To parse a JSON string received by another application or generated within
[17] Fix | Delete
# your existing application:
[18] Fix | Delete
#
[19] Fix | Delete
# require 'json'
[20] Fix | Delete
#
[21] Fix | Delete
# my_hash = JSON.parse('{"hello": "goodbye"}')
[22] Fix | Delete
# puts my_hash["hello"] => "goodbye"
[23] Fix | Delete
#
[24] Fix | Delete
# Notice the extra quotes <tt>''</tt> around the hash notation. Ruby expects
[25] Fix | Delete
# the argument to be a string and can't convert objects like a hash or array.
[26] Fix | Delete
#
[27] Fix | Delete
# Ruby converts your string into a hash
[28] Fix | Delete
#
[29] Fix | Delete
# == Generating JSON
[30] Fix | Delete
#
[31] Fix | Delete
# Creating a JSON string for communication or serialization is
[32] Fix | Delete
# just as simple.
[33] Fix | Delete
#
[34] Fix | Delete
# require 'json'
[35] Fix | Delete
#
[36] Fix | Delete
# my_hash = {:hello => "goodbye"}
[37] Fix | Delete
# puts JSON.generate(my_hash) => "{\"hello\":\"goodbye\"}"
[38] Fix | Delete
#
[39] Fix | Delete
# Or an alternative way:
[40] Fix | Delete
#
[41] Fix | Delete
# require 'json'
[42] Fix | Delete
# puts {:hello => "goodbye"}.to_json => "{\"hello\":\"goodbye\"}"
[43] Fix | Delete
#
[44] Fix | Delete
# <tt>JSON.generate</tt> only allows objects or arrays to be converted
[45] Fix | Delete
# to JSON syntax. <tt>to_json</tt>, however, accepts many Ruby classes
[46] Fix | Delete
# even though it acts only as a method for serialization:
[47] Fix | Delete
#
[48] Fix | Delete
# require 'json'
[49] Fix | Delete
#
[50] Fix | Delete
# 1.to_json => "1"
[51] Fix | Delete
#
[52] Fix | Delete
module JSON
[53] Fix | Delete
require 'json/version'
[54] Fix | Delete
[55] Fix | Delete
begin
[56] Fix | Delete
require 'json/ext'
[57] Fix | Delete
rescue LoadError
[58] Fix | Delete
require 'json/pure'
[59] Fix | Delete
end
[60] Fix | Delete
end
[61] Fix | Delete
[62] Fix | Delete
It is recommended that you Edit text format, this type of Fix handles quite a lot in one request
Function