lib/adiwg/mdtranslator/writers/mdJson/sections/mdJson_citation.rb in adiwg-mdtranslator-1.4.0.beta8 vs lib/adiwg/mdtranslator/writers/mdJson/sections/mdJson_citation.rb in adiwg-mdtranslator-1.4.0.beta9
- old
+ new
@@ -15,10 +15,10 @@
def self.build(cite)
unless cite.nil? || cite.empty?
Jbuilder.new do |json|
json.title cite[:citTitle]
json.alternateTitle cite[:citAltTitle]
- json.date json_map(cite[:citDate], DateTime)
+ json.date json_map(cite[:citDate], DateTime) unless cite[:citDate].empty?
json.edition cite[:citEdition]
json.identifier json_map(cite[:citResourceIds], ResourceIdentifier)
json.responsibleParty json_map(cite[:citResponsibleParty], ResponsibleParty)
json.presentationForm(cite[:citResourceForms]) unless cite[:citResourceForms].empty?
json.onlineResource json_map(cite[:citOlResources], OnlineResource)