Sha256: 602e44e56250e240bfca0b7ebe137806133ca15e0dfc715b68c2da364197f8aa
Contents?: true
Size: 490 Bytes
Versions: 13
Compression:
Stored size: 490 Bytes
Contents
# frozen_string_literal: true require "active_support/json" module ActiveResource module Formats module JsonFormat extend self def extension "json" end def mime_type "application/json" end def encode(hash, options = nil) ActiveSupport::JSON.encode(hash, options) end def decode(json) return nil if json.nil? Formats.remove_root(ActiveSupport::JSON.decode(json)) end end end end
Version data entries
13 entries across 13 versions & 2 rubygems