Sha256: d1ce6c224bf9454449caaa7c9f1e03a1e7bd4ca4804ff8dacf9b9d83e21b8b22
Contents?: true
Size: 1.98 KB
Versions: 25
Compression:
Stored size: 1.98 KB
Contents
require ADIWG::Mdtranslator::Readers::SbJson.readerModule('module_contacts') require ADIWG::Mdtranslator::Readers::SbJson.readerModule('module_metadata') #require ADIWG::Mdtranslator::Readers::SbJson.readerModule('module_dataDictionary') module ADIWG module Mdtranslator module Readers module SbJson def self.unpack(intObj, hSbJson, responseObj) # get json schema name and version hVersion = hSbJson['version'] intObj[:schema][:name] = hVersion['name'] intObj[:schema][:version] = hVersion['version'] # contact array # load the array of contacts from the json input if hSbJson.has_key?('contacts') aContacts = hSbJson['contacts'] aContacts.each do |hContact| unless hContact.empty? intObj[:contacts] << Contact.unpack(hContact, responseObj) end end end # add default contacts intObj[:contacts].concat(Contact.setDefaultContacts) # metadata section # load metadata from the hash object intObj[:metadata] = Metadata.unpack(hSbJson, responseObj, intObj) # # data dictionary section # if hSbJson.has_key?('dataDictionary') # aDictionary = hSbJson['dataDictionary'] # aDictionary.each do |hDictionary| # unless hDictionary.empty? # intObj[:dataDictionary] << DataDictionary.unpack(hDictionary, responseObj) # end # end # end # return ADIwg internal container return intObj end end end end end
Version data entries
25 entries across 25 versions & 1 rubygems