Package security.whisper.javastix.json
Class StixParsers
java.lang.Object
security.whisper.javastix.json.StixParsers
Default JSON Mapper is configured with JsonMapperBase configs + StixSubTypesModule + StixInstantModule
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic com.fasterxml.jackson.databind.ObjectMapperGenerates a Base Object Mapper with some generic modules.static com.fasterxml.jackson.databind.module.SimpleModulestatic com.fasterxml.jackson.databind.module.SimpleModulestatic com.fasterxml.jackson.databind.module.SimpleModuleGenerate a Jackson module for all STIX objects (SDOs, SROs, Markings, bundle, observables, and observable extensions)static com.fasterxml.jackson.databind.ObjectMapperstatic <T extends Stix>
Tstatic BundleObjectparseBundle(String bundleJsonString) static BundleableObjectparseObject(String objectJsonString) static voidsetJsonMapper(com.fasterxml.jackson.databind.ObjectMapper objectMapper) Override for setting a custom configured ObjectMapper
-
Constructor Details
-
StixParsers
public StixParsers()
-
-
Method Details
-
generateJsonMapperBase
public static com.fasterxml.jackson.databind.ObjectMapper generateJsonMapperBase()Generates a Base Object Mapper with some generic modules. -
getJsonMapper
public static com.fasterxml.jackson.databind.ObjectMapper getJsonMapper() -
setJsonMapper
public static void setJsonMapper(com.fasterxml.jackson.databind.ObjectMapper objectMapper) Override for setting a custom configured ObjectMapper -
generateStixSubTypesModule
public static com.fasterxml.jackson.databind.module.SimpleModule generateStixSubTypesModule()Generate a Jackson module for all STIX objects (SDOs, SROs, Markings, bundle, observables, and observable extensions) -
generateStixInstantModule
public static com.fasterxml.jackson.databind.module.SimpleModule generateStixInstantModule() -
generateStixBooleanModule
public static com.fasterxml.jackson.databind.module.SimpleModule generateStixBooleanModule() -
parseBundle
public static BundleObject parseBundle(String bundleJsonString) throws IOException, StixParserValidationException -
parseObject
public static BundleableObject parseObject(String objectJsonString) throws IOException, StixParserValidationException -
parse
public static <T extends Stix> T parse(String bundleJsonString, Class<T> stixClass) throws IOException, StixParserValidationException
-