a <- read.csv("00 ELEMENT DB.csv", stringsAsFactors = FALSE)

a$Melting.Point[is.na(a$Melting.Point)] <- paste("\"","\"",sep="")
a$Boiling.Point[is.na(a$Boiling.Point)] <- paste("\"","\"",sep="")
a$Heat.Capacity[is.na(a$Heat.Capacity)] <- paste("\"","\"",sep="")
a$Electronegativity[is.na(a$Electronegativity)] <- paste("\"","\"",sep="")
a$First.Ionisation.Energy2[is.na(a$First.Ionisation.Energy2)] <- paste("\"","\"",sep="")
a$First.Ionisation.Energy[is.na(a$First.Ionisation.Energy)] <- paste("\"","\"",sep="")
a$Atomic.Radius[is.na(a$Atomic.Radius)] <- paste("\"","\"",sep="")
a$Covalent.Radius[is.na(a$Covalent.Radius)] <- paste("\"","\"",sep="")
a$Van.der.Waals.Radius[is.na(a$Van.der.Waals.Radius)] <- paste("\"","\"",sep="")
a$Valency[is.na(a$Valency)] <- paste("\"","\"",sep="")

b <- paste("{Z: ", a$Atomic.Number, ", ", sep = "")
b <- paste(b, "symbol: ", "\"" ,a$symbol, "\"" ,", ", sep = "")
b <- paste(b, "element: ", "\"" ,a$element, "\"" ,", ", sep = "")
b <- paste(b, "group: ", "\"" ,a$group, "\"" ,", ", sep = "")
b <- paste(b, "period: ", "\"" ,a$period, "\"" ,", ", sep = "")
b <- paste(b, "subshell: ", "\"" ,a$subshell, "\"" ,", ", sep = "")
b <- paste(b, "atomicWeight: ", a$Atomic.Weight, ", ", sep = "")
b <- paste(b, "density: ", a$Density, ", ", sep = "")
b <- paste(b, "meltingPoint: ", a$Melting.Point, ", ", sep = "")
b <- paste(b, "boilingPoint: ", a$Boiling.Point, ", ", sep = "")
b <- paste(b, "heatCap: ", a$Heat.Capacity, ", ", sep = "")
b <- paste(b, "electronegativity: ", a$Electronegativity, ", ", sep = "")
b <- paste(b, "IE1: ", a$First.Ionisation.Energy, ", ", sep = "")
b <- paste(b, "atomicRadius: ", a$Atomic.Radius, ", ", sep = "")
b <- paste(b, "vdwRadius: ", a$Van.der.Waals.Radius, ", ", sep = "")
b <- paste(b, "covRadius: ", a$Covalent.Radius, ", ", sep = "")
b <- paste(b, "valency: ", a$Valency, ", ", sep = "")
b <- paste(b, "IE1_eV: ", a$First.Ionisation.Energy2, ", ", sep = "")
b <- paste(b, "notes: ","\"", a$notes,"\"", "}, ", sep = "")

write.csv(b,"00 JSON.csv", row.names = FALSE)