Hi,
I want to add a dictionary to the page data scripts.
But the serializer, which is used inside of cassette,
is printing the object the wrong way:
example:
var dictionary = new Dictionary<EnumXY, DtoXY>();
Bundles.AddPageData("cookieNames", dictionary );
result:
(function(w){
var d=w['cookieNames']||(w['cookieNames']={});
d.Comparer={};
d.Count=7;
d.Keys=[0,2,1,3,4,5,6];
d.Values=[{"NAME":"NAMEVALUE","OTHERPROP":OTHERPROPVALUE}, ....];
}(window));
How to archieve the correct format?
{
'0' : {"NAME":"NAMEVALUE","OTHERPROP":OTHERPROPVALUE},
....
}
I tried also other ways:
LIst<KeyValuePair<string, object>>()
-> Object {Capacity: 7, Count: 7}
and with ExpandoObject:
-> { }