Sleuth Kit Java Bindings (JNI)  4.11.0
Java bindings for using The Sleuth Kit
org.sleuthkit.datamodel.blackboardutils.attributes.BlackboardJsonAttrUtil Class Reference


class  InvalidJsonException

Static Public Member Functions

static< T > T fromAttribute (BlackboardAttribute attr, Class< T > clazz) throws InvalidJsonException
static< T > BlackboardAttribute toAttribute (BlackboardAttribute.Type attrType, String moduleName, T attrValue)

Detailed Description

A utility for converting between JSON and artifact attributes of value type TSK_BLACKBOARD_ATTRIBUTE_VALUE_TYPE.JSON.

Definition at line 29 of file

Member Function Documentation

static <T> T org.sleuthkit.datamodel.blackboardutils.attributes.BlackboardJsonAttrUtil.fromAttribute ( BlackboardAttribute  attr,
Class< T >  clazz 
) throws InvalidJsonException

Creates an object of type T from the JSON in the string value of a BlackboardAttribute with a value type of TSK_BLACKBOARD_ATTRIBUTE_VALUE_TYPE.JSON.

T The type of the object to be created from the JSON.

attrThe attribute.
clazzThe class object for class T.
The T object from the attribute.
InvalidJsonExceptionThrown the JSON in an artifact attribute cannot be deserialized to an object of the specified type.

Definition at line 67 of file

References org.sleuthkit.datamodel.BlackboardAttribute.TSK_BLACKBOARD_ATTRIBUTE_VALUE_TYPE.JSON.

static <T> BlackboardAttribute org.sleuthkit.datamodel.blackboardutils.attributes.BlackboardJsonAttrUtil.toAttribute ( BlackboardAttribute.Type  attrType,
String  moduleName,

Creates an attribute of a given type with the string value set to an object of type T serialized to JSON.

T The type of the attribute value object to be serialized.

attrTypeThe type of attribute to create.
moduleNameThe name of the module creating the attribute.
attrValueThe attribute value object.
The BlackboardAttribute object.

Definition at line 44 of file

References org.sleuthkit.datamodel.BlackboardAttribute.TSK_BLACKBOARD_ATTRIBUTE_VALUE_TYPE.JSON.

Referenced by org.sleuthkit.datamodel.blackboardutils.GeoArtifactsHelper.addArea(), org.sleuthkit.datamodel.blackboardutils.CommunicationArtifactsHelper.addAttachments(), org.sleuthkit.datamodel.blackboardutils.GeoArtifactsHelper.addRoute(), and org.sleuthkit.datamodel.blackboardutils.GeoArtifactsHelper.addTrack().

The documentation for this class was generated from the following file:

Copyright © 2011-2021 Brian Carrier. (carrier -at- sleuthkit -dot- org)
This work is licensed under a Creative Commons Attribution-Share Alike 3.0 United States License.