lib/adiwg/mdtranslator/writers/mdJson/sections/mdJson_funding.rb in adiwg-mdtranslator-2.1.2 vs lib/adiwg/mdtranslator/writers/mdJson/sections/mdJson_funding.rb in adiwg-mdtranslator-2.2.0

- old
+ new

@@ -1,9 +1,10 @@ # mdJson 2.0 writer - funding # History: -# Stan Smith 2017-03-20 original script +# Stan Smith 2017-08-31 refactored for mdJson schema 2.3 +# Stan Smith 2017-03-20 original script require 'jbuilder' require_relative 'mdJson_allocation' require_relative 'mdJson_timePeriod' @@ -17,11 +18,12 @@ @Namespace = ADIWG::Mdtranslator::Writers::MdJson def self.build(hFunding) Jbuilder.new do |json| - json.allocation @Namespace.json_map(hFunding[:allocations], Allocation) + json.description hFunding[:description] json.timePeriod TimePeriod.build(hFunding[:timePeriod]) unless hFunding[:timePeriod].empty? + json.allocation @Namespace.json_map(hFunding[:allocations], Allocation) end end # build end # Funding