Added mode to JSON state