How to send custom serialized response (for File)?

Given a schema on Parse Server

Sampleclass {
    objectId: "objectId"
    abcd: "abcd",
    file: {
        __type: "File",
        name: "name",
        url: "https://path/to/file.jpg"

I want response to be:

GET /parse/classes/Sampleclass/objectId

    "objectId": "objectId"
    "abcd": "abcd",
    "file": "https://path/to/file.jpg"

How do I achieve this?
I am using Defaults everywhere (Mongodb, without any custom file adapter).

Instead of storing file in object you can store URL as string. For example:

parseObject.set('file', file.url());

But since you said you are using default file adapter, that means file is proxied by parse server. And using hardcoded URLs with files can cause trouble in the future if you want to scale your servers.