// // JSONSettings.cs - represents settings for the JSONDataFormat parser // // Author: // Michael Becker // // Copyright (c) 2011-2020 Mike Becker's Software // // This program is free software: you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by // the Free Software Foundation, either version 3 of the License, or // (at your option) any later version. // // This program is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. // // You should have received a copy of the GNU General Public License // along with this program. If not, see . namespace UniversalEditor.DataFormats.JSON { /// /// Represents settings for the parser. /// public class JSONSettings { /// /// Gets or sets the with which to separate the object name from the object value. /// /// The with which to separate the object name from the object value. public string ObjectNameValueSeparator { get; set; } = ":"; /// /// Gets or sets the with which to prefix a field name. /// /// The with which to prefix a field name. public string FieldNamePrefix { get; set; } = "\""; /// /// Gets or sets the with which to suffix a field name. /// /// The with which to suffix a field name. public string FieldNameSuffix { get; set; } = "\""; /// /// Gets or sets the with which to prefix an array. /// /// The with which to prefix an array. public string ArrayPrefix { get; set; } = "["; /// /// Gets or sets the with which to suffix an array. /// /// The with which to suffix an array. public string ArraySuffix { get; set; } = "]"; /// /// Gets or sets the with which to prefix an array value. /// /// The with which to prefix an array value. public string ArrayValuePrefix { get; set; } = "\""; /// /// Gets or sets the with which to suffix an array value. /// /// The with which to suffix an array value. public string ArrayValueSuffix { get; set; } = "\""; /// /// Gets or sets a value indicating whether the should append a space after an object name. /// /// true if a space should be appended after an object name; otherwise, false. public bool AppendSpaceAfterObjectName { get; set; } = false; /// /// Gets or sets a value indicating whether the should append a newline after an object name. /// /// true if a newline should be appended after an object name; otherwise, false. public bool AppendLineAfterObjectName { get; set; } = true; /// /// Gets or sets a value indicating whether the should append a newline after the start of an array. /// /// true if a newline should be appended after the start of an array; otherwise, false. public bool AppendLineAfterStartArray { get; set; } = true; /// /// Gets or sets a value indicating whether the should append a newline after a value in an array. /// /// true if a newline should be appended after a value in an array; otherwise, false. public bool AppendLineAfterArrayValue { get; set; } = true; /// /// Gets or sets a value indicating whether the should append a newline after a field. /// /// true if a newline should be appended after a field; otherwise, false. public bool AppendLineAfterField { get; set; } = true; /// /// Gets or sets a value indicating whether the should append a newline after a field name. /// /// true if a newline should be appended after a field name; otherwise, false. public bool AppendLineAfterFieldName { get; set; } = false; /// /// Gets or sets the with which to separate fields in an object. /// /// The with which to separate fields in an object. public string FieldSeparator { get; set; } = ","; /// /// Gets or sets a value indicating whether the should indent child fields. /// /// true if child fields should be indented; otherwise, false. public bool IndentChildFields { get; set; } = true; /// /// Gets or sets a value indicating whether the should indent array values. /// /// true if array values should be indented; otherwise, false. public bool IndentArrayValues { get; set; } = true; /// /// Gets or sets the with which to prefix an object name. /// /// The with which to prefix an object name. public string ObjectNamePrefix { get; set; } = "\""; /// /// Gets or sets the with which to suffix an object name. /// /// The with which to suffix an object name. public string ObjectNameSuffix { get; set; } = "\""; /// /// Gets or sets the with which to prefix an object definition. /// /// The with which to prefix an object definition. public string ObjectPrefix { get; set; } = "{"; /// /// Gets or sets the with which to suffix an object definition. /// /// The with which to suffix an object definition. public string ObjectSuffix { get; set; } = "}"; /// /// Gets or sets the with which to separate the field name from the field value. /// /// The with which to separate the field name from the field value. public string FieldNameValueSeparator { get; set; } = ":"; /// /// Gets or sets the with which to prefix a string literal. /// /// The with which to prefix a string literal. public string StringLiteralPrefix { get; set; } = "\""; /// /// Gets or sets the with which to suffix a string literal. /// /// The with which to suffix a string literal. public string StringLiteralSuffix { get; set; } = "\""; } }