Package com.powsybl.security.json
Class JsonSecurityAnalysisParameters
java.lang.Object
com.powsybl.security.json.JsonSecurityAnalysisParameters
Provides methods to read and write SecurityAnalysisParameters from and to JSON.
- Author:
- Sylvain Leclerc <sylvain.leclerc at rte-france.com>
-
Method Summary
Modifier and TypeMethodDescriptionstatic SecurityAnalysisParameters
deserialize
(com.fasterxml.jackson.core.JsonParser parser, com.fasterxml.jackson.databind.DeserializationContext context) Low level deserialization method, to be used for instance for updating lsecurity analysis parameters nested in another object.static SecurityAnalysisParameters
deserialize
(com.fasterxml.jackson.core.JsonParser parser, com.fasterxml.jackson.databind.DeserializationContext context, SecurityAnalysisParameters parameters) Low level deserialization method, to be used for instance for reading security analysis parameters nested in another object.static Map<String,
ExtensionJsonSerializer> static SecurityAnalysisParameters
read
(InputStream jsonStream) Reads parameters from a JSON file (will NOT rely on platform config).static SecurityAnalysisParameters
Reads parameters from a JSON file (will NOT rely on platform config).static void
serialize
(SecurityAnalysisParameters parameters, com.fasterxml.jackson.core.JsonGenerator jsonGenerator, com.fasterxml.jackson.databind.SerializerProvider serializerProvider) Low level serialization method, to be used for instance for writing security analysis parameters nested in another object.static SecurityAnalysisParameters
update
(SecurityAnalysisParameters parameters, InputStream jsonStream) Updates parameters by reading the content of a JSON stream.static SecurityAnalysisParameters
update
(SecurityAnalysisParameters parameters, Path jsonFile) Updates parameters by reading the content of a JSON file.static void
write
(SecurityAnalysisParameters parameters, OutputStream outputStream) Writes parameters as JSON to an output stream.static void
write
(SecurityAnalysisParameters parameters, Path jsonFile) Writes parameters as JSON to a file.
-
Method Details
-
getExtensionSerializers
-
read
Reads parameters from a JSON file (will NOT rely on platform config). -
read
Reads parameters from a JSON file (will NOT rely on platform config). -
update
public static SecurityAnalysisParameters update(SecurityAnalysisParameters parameters, Path jsonFile) Updates parameters by reading the content of a JSON file. -
update
public static SecurityAnalysisParameters update(SecurityAnalysisParameters parameters, InputStream jsonStream) Updates parameters by reading the content of a JSON stream. -
write
Writes parameters as JSON to a file. -
write
Writes parameters as JSON to an output stream. -
deserialize
public static SecurityAnalysisParameters deserialize(com.fasterxml.jackson.core.JsonParser parser, com.fasterxml.jackson.databind.DeserializationContext context, SecurityAnalysisParameters parameters) throws IOException Low level deserialization method, to be used for instance for reading security analysis parameters nested in another object.- Throws:
IOException
-
deserialize
public static SecurityAnalysisParameters deserialize(com.fasterxml.jackson.core.JsonParser parser, com.fasterxml.jackson.databind.DeserializationContext context) throws IOException Low level deserialization method, to be used for instance for updating lsecurity analysis parameters nested in another object.- Throws:
IOException
-
serialize
public static void serialize(SecurityAnalysisParameters parameters, com.fasterxml.jackson.core.JsonGenerator jsonGenerator, com.fasterxml.jackson.databind.SerializerProvider serializerProvider) throws IOException Low level serialization method, to be used for instance for writing security analysis parameters nested in another object.- Throws:
IOException
-