public interface JsonSettings
version 1.0
. CAUTION:
This class is still in development and may change drastically without any further notice.Modifier and Type | Field and Description |
---|---|
static String |
VERSION_1_0
JSON Format-Version 1.0.
|
static String |
VERSION_1_1
JSON Format-Version 1.1.
|
Modifier and Type | Method and Description |
---|---|
int |
getDataRenderDepth()
Returns the set data render depth.
|
String |
getFormatVersion()
Returns the json format setting.
|
boolean |
getNonDisplayedSectionsRendering()
Gets the NonDisplayedSectionsRendering-parameter NonDisplayedSectionsRendering indicates whether non displayed
Section should be rendered |
boolean |
isMetaDataRendering()
Returns the meta
FormData rendering setting. |
boolean |
isPrettyPrinting()
Returns the prettyPrinting setting.
|
boolean |
isSectionTemplateRendering()
Returns the section template rendering setting.
|
JsonSettings |
setDataRenderDepth(int dataRenderDepth)
Sets the render depth of linked
Dataset s in the JsonOutput . |
JsonSettings |
setFormatVersion(String formatVersion)
Sets the json format version for rendering.
|
JsonSettings |
setMetaDataRendering(boolean metaDataRendering)
Turns the meta data for elements on or off.
|
void |
setNonDisplayedSectionsRendering(boolean shouldRenderNonDisplayedSections)
Sets the NonDisplayedSectionsRendering-parameter NonDisplayedSectionsRendering indicates whether non displayed
Section should be rendered |
JsonSettings |
setPrettyPrinting(boolean value)
Turns the prettyPrinting setting on or off.
|
JsonSettings |
setSectionTemplateRendering(boolean sectionTemplateRendering)
Turns the template rendering for
Section type elements on or off. |
static final String VERSION_1_0
static final String VERSION_1_1
@ApiDoc(since="5.2.190507", comment="Retrieve the pretty printing setting for json output.") boolean isPrettyPrinting()
true
if pretty printing is enabled, false
otherwise@NotNull @ApiDoc(since="5.2.190507", comment="Switch pretty printing on/off.") JsonSettings setPrettyPrinting(boolean value)
false
no whitespaces will be added, making it the best option for data transfers. If pretty printing is true
then the json output will be rendered more readable for humans using indentations and other whitespace for the json output.value
- the new setting for prettyPrinting@ApiDoc(since="5.2.191206", comment="Retrieve the current json format version.") @NotNull String getFormatVersion()
@ApiDoc(since="5.2.191206", comment="Set the json format version string.") @NotNull JsonSettings setFormatVersion(@NotNull String formatVersion)
@ApiDoc(since="5.2.191206", comment="Retrieve the SectionTemplateRendering setting for json output.") boolean isSectionTemplateRendering()
true
if section template rendering is enabled, false
otherwise@ApiDoc(since="5.2.191206", comment="Set section template rendering on/off.") @NotNull JsonSettings setSectionTemplateRendering(boolean sectionTemplateRendering)
Section
type elements on or off. If template rendering is set totrue
the template of every Section
is evaluated and the template result is the json output.If section template rendering is false
the default section rendering will be active and render the section as a simple JsonObject with its form data.sectionTemplateRendering
- the value to set@ApiDoc(since="5.2.191206", comment="Retrieve the MetaDataRendering setting for json output.") boolean isMetaDataRendering()
FormData
rendering setting.true
if meta data rendering is enabled, false
otherwise@ApiDoc(since="5.2.191206", comment="Set meta data rendering on/off.") @NotNull JsonSettings setMetaDataRendering(boolean metaDataRendering)
true
the json output will contain a ReservedJsonKeys.META_FORMDATA
attribute containing the meta data.metaDataRendering
- the value to set@NotNull @ApiDoc(since="5.2.191206", comment="Set the renderdepth for datasets.") JsonSettings setDataRenderDepth(int dataRenderDepth)
dataRenderDepth
- the value to set@ApiDoc(since="5.2.191206", comment="Retrieve the renderdepth for datasets.") int getDataRenderDepth()
void setNonDisplayedSectionsRendering(boolean shouldRenderNonDisplayedSections)
Section
should be renderedCopyright © 2021 e-Spirit AG. All Rights Reserved. Build 5.2.210210