lib/json/add/dry/monads/maybe.rb in dry-monads-1.3.5 vs lib/json/add/dry/monads/maybe.rb in dry-monads-1.4.0
- old
+ new
@@ -1,19 +1,19 @@
# frozen_string_literal: false
-require 'json' unless defined?(::JSON::JSON_LOADED) && ::JSON::JSON_LOADED
+require "json" unless defined?(::JSON::JSON_LOADED) && ::JSON::JSON_LOADED
-require 'dry/monads'
+require "dry/monads"
# Inspired by standard library implementation
# for Time serialization/deserialization see (json/lib/json/add/time.rb)
#
module Dry
module Monads
class Maybe
# Deserializes JSON string by using Dry::Monads::Maybe#lift method
def self.json_create(serialized)
- coerce(serialized.fetch('value'))
+ coerce(serialized.fetch("value"))
end
# Returns a hash, that will be turned into a JSON object and represent this
# object.
def as_json(*)