Closed codewode closed 3 years ago
For performance reasons we had to remove the generic jsonValue with 1.0.3 and it will now only return null all the time. See https://github.com/commercetools/commercetools-dotnet-core-sdk/pull/152
but nevertheless Value should hold the correct deserialized attribute
so I am including Product class from the namespace commercetools.Sdk.Domain, shall I switch to a different Nuget package to have the property "Value" instead of "jsonValue" or shall I downgrade the version of commercetools.Sdk.All? or could you please refer me to some sample implementation. Thanks
ok, I have found a way to extract the attributes, as an example below. Really a long way to access it and i have not found any documentation on that.
var value = (from p in client.Query<Product>().ToList() select p.MasterData.Current.MasterVariant.Attributes.First<Attribute>().ToNumberAttribute().Value).First();```
while trying to fetch products I assume that product attributes and nested attributes defined in product types are automatically resolved/deserialized. However, I get null value
To Reproduce
return (from p in client.Query<Product>().ToList() select p).ToList<Product>();
Expected behavior attribute values should correctly be resolved
Actual behavior
Stack information:
Additional context Using the same call directly from the postman resolves the values correctly.