replace multi_json dependency with regular stdlib JSON

JSON has been part of the ruby stdlib since 1.9.0 (see
https://github.com/ruby/ruby/commit/af1c4167), and the latest version of
google-api-client requires ruby 2.0 or better so we can assume it's available
This commit is contained in:
James Healy committed 2016-02-25 13:27:33 +11:00
1 parent b191e60cfc
commit 4b9a63c086
6 files changed
+8 -11

No files matched your search

+3 -4
View File
@@ -12,8 +12,7 @@
# See the License for the specific language governing permissions and
# limitations under the License.
require 'compat/multi_json'
require 'json'
module Google
@@ -71,7 +70,7 @@ module Google
search_path = File.expand_path(File.join(search_path, '..'))
end
end
data = File.open(filename, 'r') { |file| MultiJson.load(file.read) }
data = File.open(filename, 'r') { |file| JSON.load(file.read) }
return self.new(data)
end
@@ -119,7 +118,7 @@ module Google
# @return [String]
# JSON
def to_json
return MultiJson.dump(to_hash)
return Json.dump(to_hash)
end
def to_hash