Force.com-Toolkit-for-NET icon indicating copy to clipboard operation
Force.com-Toolkit-for-NET copied to clipboard

Raw Json

Open adayIvey opened this issue 6 years ago • 1 comments

how would you get just the raw json that is returned from a query and not a typed object

adayIvey avatar Jun 12 '19 18:06 adayIvey

@aday12345, can you explain the use case here? Do you want the raw query response as json?

public class QueryResult<T>
{
    [JsonProperty(PropertyName = "nextRecordsUrl")]
    public string NextRecordsUrl { get; set; }

    [JsonProperty(PropertyName = "totalSize")]
    public int TotalSize { get; set; }

    [JsonProperty(PropertyName = "done")]
    public bool Done { get; set; }

    [JsonProperty(PropertyName = "records")]
    public List<T> Records { get; set; }
}

Or do you just want the raw <T> as a json string?

deesejohn avatar Aug 22 '19 17:08 deesejohn