public string ToJson() { using (var helper = new EnvironmentToJsonHelper()) { helper.WriteVariables(this._env); helper.WriteErrors(this.Errors, this.AllErrors); return(helper.GetJson()); } }