ruby code now generates a hash, then uses JSON package to generate model file