Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Switch back to MultiJson's deprecated decode method as it no longer b…

…arfs deprecation warnings
  • Loading branch information...
commit 02aa6332fdbef92fd94cc424af7d1de5ae9262da 1 parent c2c3780
@laserlemon laserlemon authored
Showing with 2 additions and 6 deletions.
  1. +2 −6 lib/json_spec/helpers.rb
View
8 lib/json_spec/helpers.rb
@@ -5,10 +5,10 @@ module Helpers
extend self
def parse_json(json, path = nil)
- ruby = multi_json_load("[#{json}]").first
+ ruby = MultiJson.decode("[#{json}]").first
value_at_json_path(ruby, path)
rescue MultiJson::DecodeError
- multi_json_load(json)
+ MultiJson.decode(json)
end
def normalize_json(json, path = nil)
@@ -31,10 +31,6 @@ def load_json(relative_path)
end
private
- def multi_json_load(json)
- MultiJson.respond_to?(:load) ? MultiJson.load(json) : MultiJson.decode(json)
- end
-
def value_at_json_path(ruby, path)
return ruby unless path
Please sign in to comment.
Something went wrong with that request. Please try again.