Fix structure to json