I am parsing a string variable into a Json Object with the following code:
string[] rInfo = r.Info.ToString().Split('|');
dynamic JSON_Obj = JObject.Parse(rInfo[0]);
And it is looking fine in the Code, meaning if i check the object at runtime it has the right contents. However, after i store it in RavenDB it looks like this:
{"street": {
"$type": "Newtonsoft.Json.Linq.JValue, Newtonsoft.Json",
"$values": []
},
"country": {
"$type": "Newtonsoft.Json.Linq.JValue, Newtonsoft.Json",
"$values": []
}}
For example in country should be something like "ES" or "GB".
I am storing the JSON Object as part of a document like this:
PATCHED_Doc Doc = new PATCHED_Doc()
{
Info = JSON_Obj,
Value = "test",
Id = r.Id,
Date = r.Date,
};
session.Store(Doc);
session.SaveChanges();
Thank you in advance for your help.
{"street":"Castelló", "country":"ES", ...}. Same object, once saved, looks in RavenDB like described above... - Martin