Strategy for passing through already-serialized dto

Say I had some already-serialized objects in a datastore (BigQuery/BigTable) and I wanted to retrieve one and pass it along to the user without having to deserialize it, fill my dto, and let SS re-serialize it. Is there a strategy to accomplish this?


You can find different examples in Service Return Types docs, e.g. you can return a serialized JSON payload with:

[AddHeader(ContentType = MimeTypes.Json)]
public object Get(MyRequest request)
    return json;

Where json can be a string, Stream, byte[] or ReadOnlyMemory<char> or bytes.

Note: As it always returns JSON it will only be able to be called from JSON clients.