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
Is it possible to combine a custom serializer with one from the builder?
For instance: I have a class in my code which I want to do some manual serialization. So I go about adding mappings and sequences, but then there's a subclass in it which I don't want to serialize manually, and would rather call serializer.Serialize(currentEmitter, subclass)
The problem is, when I do this, I end up with an exception since the serializer calls DocumentStart and StreamStart, but the emitter is expecting a Scalar, Sequence, Mapping or Alias
So, is there a way to call the serializer so that it adds to an already existing emitter?
The text was updated successfully, but these errors were encountered:
Sorry for the late answer. You can use the BuildValueSerializer method of the builder to get an IValueSerializer instance, which only emits the "content" of the focument, not the DocumentStart / StreamStart.
Is it possible to combine a custom serializer with one from the builder?
For instance: I have a class in my code which I want to do some manual serialization. So I go about adding mappings and sequences, but then there's a subclass in it which I don't want to serialize manually, and would rather call serializer.Serialize(currentEmitter, subclass)
The problem is, when I do this, I end up with an exception since the serializer calls DocumentStart and StreamStart, but the emitter is expecting a Scalar, Sequence, Mapping or Alias
So, is there a way to call the serializer so that it adds to an already existing emitter?
The text was updated successfully, but these errors were encountered: