Edits to ruby script to generate json