Sha256: 1c3efebfc8f81bc900a5123f5091dfacd8341c137103cac9ce49d7ea22e9dde9
Contents?: true
Size: 446 Bytes
Versions: 16
Compression:
Stored size: 446 Bytes
Contents
require 'asir' module ASIR class Coder # !SLIDE # JSON Coder # # Note: Symbols are not handled. # The actual JSON expression is wrapped with an Array. class JSON < self def _encode obj [ obj ].to_json end def _decode obj ::JSON.parser.new(obj). parse.first end end # !SLIDE END end end if RUBY_PLATFORM =~ /java/ require 'json' else require 'json/ext' end
Version data entries
16 entries across 16 versions & 2 rubygems