跳至内容 跳至搜索
方法
#
D
F
包含模块

常量

JSON_START_WITH = /\A(?:[{\["]|-?\d|true|false|null)/
 

实例公共方法

_load(dumped)

# File activesupport/lib/active_support/messages/serializer_with_fallback.rb, line 90
def _load(dumped)
  ActiveSupport::JSON.decode(dumped)
end

dump(object)

# File activesupport/lib/active_support/messages/serializer_with_fallback.rb, line 86
def dump(object)
  ActiveSupport::JSON.encode(object)
end

dumped?(dumped)

# File activesupport/lib/active_support/messages/serializer_with_fallback.rb, line 96
def dumped?(dumped)
  JSON_START_WITH.match?(dumped)
end

format()

# File activesupport/lib/active_support/messages/serializer_with_fallback.rb, line 82
def format
  :json
end