In the 3.0.1 there is multiple issue with the ContentAs function:
If we ask for the expiry, this is breaking the serialization paradigm:
You create a JObject (So it’s limiting to NewtonSoft), instead you may ask the ITypeSerializer to create a raw object.
You add property by using JProperty, idem, the ITypeSerializer must have a function to do so
You finaly do two times a ToObject() => So you are using the default serializer instead of the ITypeSerializer.
So the result is : asking for expiry, is making the ITypeSerialized not used anymore…
I do not look at all the sdk, but if you ask to Expiry, you still push a specs Get. So i expect the ContentAs to return the object fully instead of the composite of expiry and the document… I did patch the sdk for our usage with that change:
if (_specs.Count == 1 && _projectList?.Count == 0)
var spec = _specs;
return _transcoder.Decode(spec.Bytes, Flags, OpCode.Get);
// normal GET
// If requesting the full doc, return the full doc…
var getSpecs = _specs.FirstOrDefault(s => s.OpCode == OpCode.Get);
if (getSpecs != null && _projectList?.Count == 0)
return _transcoder.Decode(getSpecs.Bytes, Flags, OpCode.Get);
This is increasing the performance of requesting the Expiry by 50% and this is respecting the ITypeSerializer.