You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I have problem if class has property ICollection<SomeClass> foo and this property has attribute [SerializeAs(SerializeAsOptions.Embedded)]. There is switch with case SerializeAsOptions.Embedded in JsonApiFormatter.Serialize(..).
That case contains: this.Serialize(prop.GetValue(value, null), writeStream, writer, serializer, aggregator);
But property should be serialized as many.
There could be something like that:
var propValue = prop.GetValue(value, null);
if (_modelManager.IsSerializedAsMany(propValue.GetType()))
this.SerializeMany(propValue, writeStream, writer, serializer, aggregator);
else
this.Serialize(propValue, writeStream, writer, serializer, aggregator);
The text was updated successfully, but these errors were encountered:
Yes, unfortunately SerializeAsOptions.Embedded is not fully supported yet. I'm concerned about rushing this as it may introduce complications both for design and implementation (what about recursion? what about _de_serializing?), but we can tag this for 0.4.0 and see if it fits.
I have problem if class has property
ICollection<SomeClass> foo
and this property has attribute[SerializeAs(SerializeAsOptions.Embedded)]
. There isswitch
withcase SerializeAsOptions.Embedded
inJsonApiFormatter.Serialize(..)
.That case contains:
this.Serialize(prop.GetValue(value, null), writeStream, writer, serializer, aggregator);
But property should be serialized as many.
There could be something like that:
The text was updated successfully, but these errors were encountered: