Class StateJson
java.lang.Object
dev.langchain4j.internal.StateJson
Entry point for the JSON codec used where values are not known ahead of time and their types have
to be written into the document.
Kept apart from ProviderJson, which describes a wire format agreed with a remote service
and never writes type information.
- See Also:
-
Method Summary
Modifier and TypeMethodDescriptionstatic Json.JsonCodeccodec(TypeAllowlist allowlist) A codec is built per call rather than cached, because aTypeAllowlistis mutable and a caller registering a type expects that to apply to the codec it holds.static Json.JsonCodeccodec(TypeAllowlist allowlist, ClassLoader classLoader)
-
Method Details
-
codec
A codec is built per call rather than cached, because aTypeAllowlistis mutable and a caller registering a type expects that to apply to the codec it holds. -
codec
- Parameters:
classLoader- resolves the type names found in the document, or null to leave that to the JSON library. A codec cannot be told this after it is built - one of the two Jackson versions has no way to reconfigure a mapper - so changing it means asking for another codec.
-