Package org.springframework.ai.util.json
Class JsonParser
java.lang.Object
org.springframework.ai.util.json.JsonParser
Deprecated, for removal: This API element is subject to removal in a future version.
Utilities to perform parsing operations between JSON and Java.
-
Method Summary
Modifier and TypeMethodDescriptionstatic <T> @Nullable TDeprecated, for removal: This API element is subject to removal in a future version.UseJsonHelper.fromJson(String, Class)insteadstatic <T> @Nullable TDeprecated, for removal: This API element is subject to removal in a future version.UseJsonHelper.fromJson(String, Type)insteadstatic <T> @Nullable TDeprecated, for removal: This API element is subject to removal in a future version.static tools.jackson.databind.json.JsonMapperDeprecated, for removal: This API element is subject to removal in a future version.UseJacksonUtils.getDefaultJsonMapper()insteadstatic StringDeprecated, for removal: This API element is subject to removal in a future version.UseJsonHelper.toJson(Object, boolean)insteadstatic ObjecttoTypedObject(Object value, Class<?> type) Deprecated, for removal: This API element is subject to removal in a future version.
-
Method Details
-
getJsonMapper
Deprecated, for removal: This API element is subject to removal in a future version.UseJacksonUtils.getDefaultJsonMapper()insteadReturns a JacksonJsonMapperinstance tailored for JSON-parsing operations for tool calling and structured output. -
fromJson
Deprecated, for removal: This API element is subject to removal in a future version.UseJsonHelper.fromJson(String, Class)insteadConverts a JSON string to a Java object. -
fromJson
Deprecated, for removal: This API element is subject to removal in a future version.UseJsonHelper.fromJson(String, Type)insteadConverts a JSON string to a Java object. -
fromJson
@Deprecated(forRemoval=true) public static <T> @Nullable T fromJson(String json, tools.jackson.core.type.TypeReference<T> type) Deprecated, for removal: This API element is subject to removal in a future version.Converts a JSON string to a Java object. -
toJson
Deprecated, for removal: This API element is subject to removal in a future version.UseJsonHelper.toJson(Object, boolean)insteadConverts a Java object to a JSON string if it's not already a valid JSON string. -
toTypedObject
Deprecated, for removal: This API element is subject to removal in a future version.Convert a Java Object to a typed Object. Based on the implementation in MethodToolCallback.
-
JacksonUtilsorJsonHelperinstead