SimpleValueParseMode
İçindekiler
[
Saklamak
]JsonDataLoadOptions.SimpleValueParseMode property
JSON yüklenirken JSON basit değerlerini (null, boolean, sayı, tam sayı ve dize) ayrıştırmak için bir mod alır veya ayarlar . Böyle bir mod tarih-saat değerlerinin ayrıştırılmasını etkilemez. Varsayılan ‘dirLoose .
public JsonSimpleValueParseMode SimpleValueParseMode { get; set; }
Örnekler
JSON’un veri kaynağı (dize) olarak nasıl kullanılacağını gösterir.
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");
Ayrıca bakınız
- enum JsonSimpleValueParseMode
- class JsonDataLoadOptions
- ad alanı Aspose.Words.Reporting
- toplantı Aspose.Words