module ActiveSupport::Messages::SerializerWithFallback::JsonWithFallback
Constants
- JSON_START_WITH
Public Instance Methods
Source
# File lib/active_support/messages/serializer_with_fallback.rb, line 90 def _load(dumped) ActiveSupport::JSON.decode(dumped) end
Source
# File lib/active_support/messages/serializer_with_fallback.rb, line 86 def dump(object) ActiveSupport::JSON.encode(object) end
Source
# File lib/active_support/messages/serializer_with_fallback.rb, line 96 def dumped?(dumped) JSON_START_WITH.match?(dumped) end
Source
# File lib/active_support/messages/serializer_with_fallback.rb, line 82 def format :json end
Private Instance Methods
Source
# File lib/active_support/messages/serializer_with_fallback.rb, line 101 def detect_format(dumped) # Assume JSON format if format could not be determined. super || :json end
Calls superclass method