Class Jackson3ProviderJsonCodec
java.lang.Object
dev.langchain4j.jackson3.Jackson3ProviderJsonCodec
- All Implemented Interfaces:
Json.JsonCodec
Jackson 3 codec for provider wire DTOs.
The defaults Jackson 3 changed are pinned to their Jackson 2 values, so switching the codec does not also change what goes on the wire.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescription<T> TConvert the given JSON string to an object of the given class.<T> TConvert the given JSON string to an object of the given type.Convert the given object to JSON.
-
Constructor Details
-
Jackson3ProviderJsonCodec
-
-
Method Details
-
toJson
Description copied from interface:Json.JsonCodecConvert the given object to JSON.- Specified by:
toJsonin interfaceJson.JsonCodec- Parameters:
o- the object to convert.- Returns:
- the JSON string.
-
fromJson
Description copied from interface:Json.JsonCodecConvert the given JSON string to an object of the given class.- Specified by:
fromJsonin interfaceJson.JsonCodec- Type Parameters:
T- the type of the object.- Parameters:
json- the JSON string.type- the class of the object.- Returns:
- the object.
-
fromJson
Description copied from interface:Json.JsonCodecConvert the given JSON string to an object of the given type.- Specified by:
fromJsonin interfaceJson.JsonCodec- Type Parameters:
T- the type of the object.- Parameters:
json- the JSON string.type- the type of the object.- Returns:
- the object.
-