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
The current implementations of IFhirSerlializationEngine that can be created from the FhirSerializationEngineFactory all serialize "pretty" output: using indentation and newlines.
There is also a use case for compact serialization, for performance, and memory and bandwidth optimization scenario's.
We have this in the FhirJsonSerializerOptionExtensions in the shape of the .UsingMode(mode).Pretty() and UsingMode(mode).Compact() extensions :). Unfortunately this is limited to the Json serializers
The issue here is that pretty and compact notations are handled by System.Text.Json directly as opposed to our tooling. When we use the JsonSerializerOptions, we get an UTF-8 writer to write to, and STJ handles the formatting. When a BaseFhirJsonPocoSerializer is created (which is done internally in the engine factory), we do not have access to this. In that case, we have to do the formatting ourself, which we do not currently do. We may have to implement this at some point, but for now, at least for JSON, our higher level API with .ForFhir supports formatting while our serialization engines and base serializers do not.
The current implementations of
IFhirSerlializationEngine
that can be created from theFhirSerializationEngineFactory
all serialize "pretty" output: using indentation and newlines.There is also a use case for compact serialization, for performance, and memory and bandwidth optimization scenario's.
Additions from @ewoutkramer:
The text was updated successfully, but these errors were encountered: