You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I have a migrations for which i describe query in a form of Expression<Func<JsonObject, bool>> and this expression will get translated to SQL and sent to cosmos and than the migration run on subset of database. So far so good. Now i have migrated most of the codebase to the System.Text.Json I want to make this work with JsonObject instead of JObject
Now something like this wont work because expression visitor is complaining about get_Item method not supported
var key = "C2y6yDjf5/R+ob0N8A7Cgv30VRDJIWEHLM+4QDU5DE2nQ9nDuVTqobD4b8mGGyPMbIZnqyMsEcaGQy67XIw/Jw==";
var client = new CosmosClient("https://localhost:8081/", key);
var container = client.GetContainer("wont-be-needed", "does-not-matter");
IOrderedQueryable<JsonObject> queryable = container.GetItemLinqQueryable<JsonObject>();
IQueryable<JsonObject> queryable1 = queryable.Where(f => (string)f["id"] == "fooBar");
queryable1.ToQueryDefinition();
Right now, the System.Text.JSON package depends on the Azure.Core version 1.19.0, which uses the STJ version 4.6.0. The JsonNode type was introduced in a later package, so we aren't able to support this LINQ to SQL translation at this time.
Newtonsoft will continue to be the default serializer for V3 of the .NET SDK. We should be able to support this scenario in V4, or when the Azure.Core version is upgraded.
I have a migrations for which i describe query in a form of
Expression<Func<JsonObject, bool>>
and this expression will get translated to SQL and sent to cosmos and than the migration run on subset of database. So far so good. Now i have migrated most of the codebase to the System.Text.Json I want to make this work with JsonObject instead of JObjectNow something like this wont work because expression visitor is complaining about get_Item method not supported
https://gist.github.com/vmachacek/09d27a9f552bc94e3d7b11453b67f94e
I want query defined as
(string)foobar["prop"] == "bar"
work withJsonObject
same as it is working withJObject
I have considered keeping dependency on Newtonsoft.
Broader question is what are the plans for integrating System.Text.Json into the SDK, or what course of action i should take?
exception
Method 'get_Item' is not supported., Windows/10.0.22000 cosmos-netstandard-sdk/3.28.2
The text was updated successfully, but these errors were encountered: