Is it a good idea to make service calls during deserialization?
<p>In the <a href="http://www.newtonsoft.com/json/help/html/customcreationconverter.htm" rel="nofollow noreferrer">Newtonsoft docs</a> for <code>CustomCreationConverter</code>, it says:</p>

<p>"A more complicated scenario could involve an object factory or service locator that resolves the object at runtime."</p>

<p>I'm dealing with such a scenario where I have to hydrate a persistent object with an incoming DTO (which is in JSON). To hydrate the persistent object, I have to first load it using a service call. I can make this call during deserialization using <code>CustomCreationConverter</code>. Or I can consume the JSON as an <code>ExpandoObject</code> and transitively assign all members. Complexity is not much as the object graph is small. </p>

<p>Something about making service calls during deserialization does not seem right. It makes testing more complicated as I would have to first load that object into memory to be able to deserialize it. This also screams tight coupling.</p>

<p>So my question is: <strong>Is it a good idea to make service calls during deserialization in this scenario?</strong></p>