PreserveSpaces
Contenuti
[
Nascondere
]JsonDataLoadOptions.PreserveSpaces property
Ottiene o imposta un flag che indica se gli spazi iniziali e finali devono essere conservati durante il caricamento dei valori string dei dati JSON.
public bool PreserveSpaces { get; set; }
Osservazioni
Il valore predefinito èfalso
.
Esempi
Mostra come utilizzare JSON come origine dati (stringa).
Document doc = new Document(MyDir + "Reporting engine template - JSON data destination.docx");
JsonDataLoadOptions options = new JsonDataLoadOptions
{
ExactDateTimeParseFormats = new List<string> {"MM/dd/yyyy", "MM.d.yy", "MM d yy"},
AlwaysGenerateRootObject = true,
PreserveSpaces = true,
SimpleValueParseMode = JsonSimpleValueParseMode.Loose
};
JsonDataSource dataSource = new JsonDataSource(MyDir + "List of people.json", options);
BuildReport(doc, dataSource, "persons");
doc.Save(ArtifactsDir + "ReportingEngine.JsonDataString.docx");
Guarda anche
- class JsonDataLoadOptions
- spazio dei nomi Aspose.Words.Reporting
- assemblea Aspose.Words