java.lang.Object
com.aspose.words.JsonSimpleValueParseMode
public class JsonSimpleValueParseMode
- extends java.lang.Object
Utility class containing constants.
Specifies a mode for parsing JSON simple values (null, boolean, number, integer, and string) while loading JSON.
Such a mode does not affect parsing of date-time values.
Example:
Shows how to use JSON as a data source (string).
Document doc = new Document(getMyDir() + "Reporting engine template - JSON data destination (Java).docx");
JsonDataLoadOptions options = new JsonDataLoadOptions();
{
options.setExactDateTimeParseFormats(Arrays.asList(new String[]{"MM/dd/yyyy", "MM.d.yy", "MM d yy"}));
}
JsonDataSource dataSource = new JsonDataSource(getMyDir() + "List of people.json", options);
buildReport(doc, dataSource, "persons");
doc.save(getArtifactsDir() + "ReportingEngine.JsonDataString.docx");
|
Field Summary |
static final int | LOOSE = 0 | |
|
Specifies the mode where types of JSON simple values are determined upon parsing of their string representations.
For example, the type of 'prop' from the JSON snippet '{ prop: "123" }' is determined as integer in this mode.
|
static final int | STRICT = 1 | |
|
Specifies the mode where types of JSON simple values are determined from JSON notation itself.
For example, the type of 'prop' from the JSON snippet '{ prop: "123" }' is determined as string in this mode.
|
LOOSE = 0 | |
public static final int LOOSE |
-
Specifies the mode where types of JSON simple values are determined upon parsing of their string representations.
For example, the type of 'prop' from the JSON snippet '{ prop: "123" }' is determined as integer in this mode.
STRICT = 1 | |
public static final int STRICT |
-
Specifies the mode where types of JSON simple values are determined from JSON notation itself.
For example, the type of 'prop' from the JSON snippet '{ prop: "123" }' is determined as string in this mode.
See Also:
Aspose.Words Documentation - the home page for the Aspose.Words Product Documentation.
Aspose.Words Support Forum - our preferred method of support.