diff --git a/lib/adiwg/mdtranslator/writers/mdJson/sections/mdJson_coverageResult.rb b/lib/adiwg/mdtranslator/writers/mdJson/sections/mdJson_coverageResult.rb index 17081721..9249d6d4 100644 --- a/lib/adiwg/mdtranslator/writers/mdJson/sections/mdJson_coverageResult.rb +++ b/lib/adiwg/mdtranslator/writers/mdJson/sections/mdJson_coverageResult.rb @@ -14,12 +14,12 @@ module CoverageResult def self.build(hCoverageResult) Jbuilder.new do |json| json.dateTime hCoverageResult[:dateTime] - json.scope Scope.build(hCoverageResult[:scope]) + json.scope Scope.build(hCoverageResult[:scope]) unless hCoverageResult[:scope].empty? json.spatialRepresentationType hCoverageResult[:spatialRepresentationType] - json.spatialRepresentation SpatialRepresentation.build(hCoverageResult[:spatialRepresentation]) unless hCoverageResult[:spatialRepresentation].nil? - json.resultContentDescription CoverageDescription.build(hCoverageResult[:resultContentDescription]) unless hCoverageResult[:resultContentDescription].nil? - json.resourceFormat Format.build(hCoverageResult[:resourceFormat]) unless hCoverageResult[:resourceFormat].nil? - json.resultFile QualityResultFile.build(hCoverageResult[:resultFile]) unless hCoverageResult[:resultFile].nil? + json.spatialRepresentation SpatialRepresentation.build(hCoverageResult[:spatialRepresentation]) unless hCoverageResult[:spatialRepresentation].empty? + json.resultContentDescription CoverageDescription.build(hCoverageResult[:resultContentDescription]) unless hCoverageResult[:resultContentDescription].empty? + json.resourceFormat Format.build(hCoverageResult[:resourceFormat]) unless hCoverageResult[:resourceFormat].empty? + json.resultFile QualityResultFile.build(hCoverageResult[:resultFile]) unless hCoverageResult[:resultFile].empty? end end end