public final class JsonWriter extends AbstractProjectWriter
| Constructor and Description |
|---|
JsonWriter() |
| Modifier and Type | Method and Description |
|---|---|
Charset |
getCharset()
Retrieve the charset to used when writing the JSON file.
|
boolean |
getIncludeLayoutData()
Retrieve a flag indicating if layout data should be included in the output.
|
boolean |
getPretty()
Retrieve the pretty-print flag.
|
TimeUnit |
getTimeUnits()
Retrieve the time units used for durations.
|
boolean |
getWriteAttributeTypes()
Returns true of attribute type information is written to the JSON file.
|
void |
setCharset(Charset charset)
Set the charset to used when writing the JSON file.
|
void |
setIncludeLayoutData(boolean includeLayoutData)
Set a flag indicating if layout data should be included in the output.
|
void |
setPretty(boolean pretty)
Set the pretty-print flag.
|
void |
setTimeUnits(TimeUnit value)
Set the time units to use for durations.
|
void |
setWriteAttributeTypes(boolean writeAttributeTypes)
Sets the flag used to determine if attribute types are written to the JSON file.
|
void |
write(List<ProjectFile> projects,
OutputStream outputStream)
Write a file containing multiple projects to the supplied OutputStream instance.
|
void |
write(ProjectFile projectFile,
OutputStream stream)
Write a project file's content to the supplied OutputStream instance.
|
write, write, write, writepublic boolean getPretty()
public void setPretty(boolean pretty)
pretty - true if pretty printing is enabledpublic boolean getIncludeLayoutData()
public void setIncludeLayoutData(boolean includeLayoutData)
includeLayoutData - true if layout data is includedpublic Charset getCharset()
public void setCharset(Charset charset)
charset - charset to usepublic boolean getWriteAttributeTypes()
public void setWriteAttributeTypes(boolean writeAttributeTypes)
writeAttributeTypes - set to true to write attribute typespublic void setTimeUnits(TimeUnit value)
value - time unitspublic TimeUnit getTimeUnits()
public void write(List<ProjectFile> projects, OutputStream outputStream)
ProjectWriterprojects - projects to writeoutputStream - OutputStream instancepublic void write(ProjectFile projectFile, OutputStream stream) throws IOException
ProjectWriterprojectFile - project file instancestream - OutputStream instanceIOExceptionCopyright © 2000–2025 MPXJ. All rights reserved.