From 9f4866a6cb1a1b67eb116b8ec663b1cc728c4666 Mon Sep 17 00:00:00 2001 From: Joshua Pinter Date: Fri, 17 Apr 2026 11:20:42 -0600 Subject: [PATCH] Replace the deprecated `MultiJson.decode` with `MultiJson.load`. Was getting the following message when using `.decode`: > MultiJson.decode is deprecated and will be removed in v2.0. Use MultiJson.load instead. --- lib/json_spec/helpers.rb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/json_spec/helpers.rb b/lib/json_spec/helpers.rb index cb8083d..4d53b56 100644 --- a/lib/json_spec/helpers.rb +++ b/lib/json_spec/helpers.rb @@ -5,10 +5,10 @@ module Helpers extend self def parse_json(json, path = nil) - ruby = MultiJson.decode("[#{json}]").first + ruby = MultiJson.load("[#{json}]").first value_at_json_path(ruby, path) rescue MultiJson::DecodeError - MultiJson.decode(json) + MultiJson.load(json) end def normalize_json(json, path = nil)