Sha256: ed3e5aff8411a8e162dd8a3b76a3bf1c04222267751a70e6b12e10a063e7ea02
Contents?: true
Size: 587 Bytes
Versions: 16
Compression:
Stored size: 587 Bytes
Contents
module Nucleon module Translator class JSON < Nucleon.plugin_class(:nucleon, :translator) #----------------------------------------------------------------------------- # Translator operations def parse(json_text) return super do |properties| if json_text && ! json_text.empty? properties = Util::Data.symbol_map(Util::Data.parse_json(json_text)) end properties end end #--- def generate(properties) return super do Util::Data.to_json(Util::Data.string_map(properties), get(:pretty, true)) end end end end end
Version data entries
16 entries across 16 versions & 1 rubygems