Currently, not only the object but also the serialized representation is
kept in memory in full. For small objects that is usually fine, but when
exporting large data structures this makes the memory explode. This gets
even worse when exporting it indented.
The byte-output has changed since the Encoder.Encode functions add an
extra new-line, the marshaled output outside of that remains the same.