aboutsummaryrefslogtreecommitdiffstats
path: root/Library
diff options
context:
space:
mode:
Diffstat (limited to 'Library')
-rw-r--r--Library/Homebrew/compat.rb1
-rw-r--r--Library/Homebrew/compat/json.rb (renamed from Library/Homebrew/utils/json.rb)5
-rw-r--r--Library/Homebrew/utils.rb1
3 files changed, 5 insertions, 2 deletions
diff --git a/Library/Homebrew/compat.rb b/Library/Homebrew/compat.rb
index db0ece584..0b81e037a 100644
--- a/Library/Homebrew/compat.rb
+++ b/Library/Homebrew/compat.rb
@@ -18,3 +18,4 @@ require "compat/language/haskell"
require "compat/xcode"
require "compat/software_spec"
require "compat/utils"
+require "compat/json"
diff --git a/Library/Homebrew/utils/json.rb b/Library/Homebrew/compat/json.rb
index 21c5b52b0..c8bf1c292 100644
--- a/Library/Homebrew/utils/json.rb
+++ b/Library/Homebrew/compat/json.rb
@@ -7,16 +7,19 @@ module Utils
Error = Class.new(StandardError)
def load(str)
- ::JSON.load(str)
+ odeprecated "Utils::JSON.load", "JSON.parse"
+ ::JSON.parse(str)
rescue ::JSON::ParserError => e
raise Error, e.message
end
def dump(obj)
+ odeprecated "Utils::JSON.dump", "JSON.generate"
::JSON.generate(obj)
end
def stringify_keys(obj)
+ odeprecated "Utils::JSON.stringify_keys"
case obj
when Array
obj.map { |val| stringify_keys(val) }
diff --git a/Library/Homebrew/utils.rb b/Library/Homebrew/utils.rb
index 7a7673d01..89a90bed2 100644
--- a/Library/Homebrew/utils.rb
+++ b/Library/Homebrew/utils.rb
@@ -9,7 +9,6 @@ require "utils/git"
require "utils/github"
require "utils/hash"
require "utils/inreplace"
-require "utils/json"
require "utils/popen"
require "utils/tty"