Custom invoke method, differences in the return object, help

hello, I'm new to radzen, and I started creating custom invoke methods for my project (in C#).

I have a method and I saw that all 3 of these return statement work the same, so I was trying to understand what is the difference between them, and which one should I use?

  1. return Json(returnObject, new JsonSerializerSettings(){ContractResolver = new DefaultContractResolver()});

  2. return Json(returnObject);

  3. return Json(new { returnObject } );

all 3 of these give me the same result, but what are the differences?

bonus question: are there downsides in using custom invoke methods? in this case, I probably could have used a method generated by radzen and just add some filters in the Query builder, but I ended by creating a custom method and doing the filtering already inside it.
Is it better to use Radzen generated methods and filter them with the query builder, or is it just fine to create custom ones?

All three approaches are the same - will return object as json. If you just need filtering you can use default data source methods.

@enchev so basically all 3 accomplish the exact same thing, it's just a matter of syntax and no actual differences?

and finally, are there downsides in not using the default data source methods? My filtering is a bit special, as I need to convert the Date object I use to filter, and it seemed more obvious to me create a custom invoke and do my filtering inside it, than creating properties, doing the conversion and then passing the converted value to the Default data source method.

I'm just not sure if I lose something by not using the default method, for example in the Default method I have this code on the Count property:

event.top != null && event.skip != null ? result['@odata.count'] : ${result.value.length}

but in my Custom invoke I don't

Besides count default methods will apply sorting, paging and filtering. Can select projection of your data and can export to CSV and XLSX.