Gravatar for

Question by Simon, Sep 2, 2016 5:47 AM

Why a return type is necessary.

This question has often been asked. Why are computed fields returned as strings by default if the Return Type property is not in use, as mentioned here:

Why not use .Net Deserialization which would automatically detect the type serialized object?

My answer is to actually protect the index, since it only supports a certain types of objects, such as mentioned here:

Is this the correct answer?

1 Reply
Gravatar for

Answer by Simon, Sep 6, 2016 9:42 AM

So the answer is the fact that the return type is used to explicitly set the "Sitecore" type, not the .Net one. So the idea of a .Net serialization/deserialization is not fully relevant. This is simply a Sitecore design choice, and Coveo adapts to it.

Ask a question