2 writes to _jsonSerializerOptions
Microsoft.Extensions.AI (2)
Embeddings\DistributedCachingEmbeddingGenerator.cs (2)
38
_jsonSerializerOptions
= AIJsonUtilities.DefaultOptions;
48
_jsonSerializerOptions
= value;
7 references to _jsonSerializerOptions
Microsoft.Extensions.AI (7)
Embeddings\DistributedCachingEmbeddingGenerator.cs (7)
44
get =>
_jsonSerializerOptions
;
56
_jsonSerializerOptions
.MakeReadOnly();
60
return JsonSerializer.Deserialize(existingJson, (JsonTypeInfo<TEmbedding>)
_jsonSerializerOptions
.GetTypeInfo(typeof(TEmbedding)));
71
_jsonSerializerOptions
.MakeReadOnly();
73
var newJson = JsonSerializer.SerializeToUtf8Bytes(value, (JsonTypeInfo<TEmbedding>)
_jsonSerializerOptions
.GetTypeInfo(typeof(TEmbedding)));
83
_jsonSerializerOptions
.MakeReadOnly();
84
return CachingHelpers.GetCacheKey(values,
_jsonSerializerOptions
);