Sha256: c2959f71787f10a2bafec9780ced856bfa8d5aa0ebd58e0abcc2abb89b0fcaba
Contents?: true
Size: 561 Bytes
Versions: 8
Compression:
Stored size: 561 Bytes
Contents
module Alf class Reader # # Implements Alf::Reader contract for reading JSON input. # class JSON < Reader def self.mime_type "application/json" end def each return to_enum unless block_given? require 'json' p = ::JSON.parse(input_text, create_additions: false) p = [p] if TupleLike===p p.each do |t| yield Support.symbolize_keys(t) end end Alf::Reader.register(:json, [".json"], self) end # class JSON end # class Reader end # module Alf
Version data entries
8 entries across 8 versions & 1 rubygems