Our application is currently working on MongoDb. Our plan is to make it work with Datastore. In our application, there are some API calls and we don't know how its response is structured. So, we work with dynamic types. We get response and put it to Mongodb as is.
As far as we examined, Google.Cloud.Datastore.V1 .Net SDK pushes developers to work with structured type. We have to create an entity which has certain properties with predefined key names.
As shown below:
MapField<string, Value> fields = new MapField<string, Value>();
fields.Add("d1", "string value");
fields.Add("d2", 30);
fields.Add("d3", 55);
var entity = new Entity
{
Key = key,
Properties = { fields }
};
What I've already tried is to set API response to a field. Unfortunately it ended up saving response as a string.
Is there anyway to achive it?