Add FormatJSON function