Generate structure for json