2 writes to _jsonSerializerOptions
Microsoft.Extensions.AI (2)
Embeddings\DistributedCachingEmbeddingGenerator.cs (2)
37
_jsonSerializerOptions
= AIJsonUtilities.DefaultOptions;
47
_jsonSerializerOptions
= value;
6 references to _jsonSerializerOptions
Microsoft.Extensions.AI (6)
Embeddings\DistributedCachingEmbeddingGenerator.cs (6)
43
get =>
_jsonSerializerOptions
;
55
_jsonSerializerOptions
.MakeReadOnly();
59
return JsonSerializer.Deserialize(existingJson, (JsonTypeInfo<TEmbedding>)
_jsonSerializerOptions
.GetTypeInfo(typeof(TEmbedding)));
70
_jsonSerializerOptions
.MakeReadOnly();
72
var newJson = JsonSerializer.SerializeToUtf8Bytes(value, (JsonTypeInfo<TEmbedding>)
_jsonSerializerOptions
.GetTypeInfo(typeof(TEmbedding)));
83
return CachingHelpers.GetCacheKey(value,
_jsonSerializerOptions
);