Skip to content

Commit 5d12ac6

Browse files
committed
fix: use the safe json load to fix deprecation warnings.
1 parent 84105c9 commit 5d12ac6

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

lib/pact/consumer_contract/consumer_contract.rb

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,10 @@ def self.from_hash(hash)
4848
end
4949

5050
def self.from_json string
51-
deserialised_object = JSON.unsafe_load(maintain_backwards_compatiblity_with_producer_keys(string))
51+
deserialised_object = JSON.load(
52+
maintain_backwards_compatiblity_with_producer_keys(string),
53+
nil, { create_additions: false }
54+
)
5255
from_hash(deserialised_object)
5356
end
5457

0 commit comments

Comments
 (0)