just one hint, in ruby you can use
`p["spares"] = info.spares.to_a unless info.spares.empty?`