Partager via


ContextVariableJacksonConverter Class

  • java.lang.Object
    • com.microsoft.semantickernel.contextvariables.converters.ContextVariableJacksonConverter

public final class ContextVariableJacksonConverter

A utility class for creating ContextVariableTypeConverter<T> instances that use Jackson for serialization and deserialization.

Constructor Summary

Constructor Description
ContextVariableJacksonConverter()

Method Summary

Modifier and Type Method and Description
static Builder<T> builder(Class<T> type)

Creates a new ContextVariableTypeConverter.Builder<T> for a ContextVariableTypeConverter<T> that uses Jackson for serialization and deserialization.

static Builder<T> builder(Class<T> type, ObjectMapper mapper)

Creates a new ContextVariableTypeConverter.Builder<T> for a ContextVariableTypeConverter<T> that uses Jackson for serialization and deserialization.

static ContextVariableTypeConverter<T> create(Class<T> type)

Creates a new ContextVariableTypeConverter<T> that uses Jackson for serialization and deserialization.

static ContextVariableTypeConverter<T> create(Class<T> type, ObjectMapper mapper)

Creates a new ContextVariableTypeConverter<T> that uses Jackson for serialization and deserialization.

Methods inherited from java.lang.Object

java.lang.Object.clone java.lang.Object.equals java.lang.Object.finalize java.lang.Object.getClass java.lang.Object.hashCode java.lang.Object.notify java.lang.Object.notifyAll java.lang.Object.toString java.lang.Object.wait java.lang.Object.wait java.lang.Object.wait

Constructor Details

ContextVariableJacksonConverter

public ContextVariableJacksonConverter()

Method Details

builder

public static ContextVariableTypeConverter.Builder builder(Class type)

Creates a new ContextVariableTypeConverter.Builder<T> for a ContextVariableTypeConverter<T> that uses Jackson for serialization and deserialization.

Parameters:

type - the type of the context variable

Returns:

builder

public static ContextVariableTypeConverter.Builder builder(Class type, ObjectMapper mapper)

Creates a new ContextVariableTypeConverter.Builder<T> for a ContextVariableTypeConverter<T> that uses Jackson for serialization and deserialization.

Parameters:

type - the type of the context variable
mapper - the ObjectMapper to use for serialization and deserialization

Returns:

create

public static ContextVariableTypeConverter create(Class type)

Creates a new ContextVariableTypeConverter<T> that uses Jackson for serialization and deserialization.

Parameters:

type - the type of the context variable

Returns:

create

public static ContextVariableTypeConverter create(Class type, ObjectMapper mapper)

Creates a new ContextVariableTypeConverter<T> that uses Jackson for serialization and deserialization.

Parameters:

type - the type of the context variable
mapper - the ObjectMapper to use for serialization and deserialization

Returns:

Applies to