Stephen Brannan - 425 - Jul 15, 2014

Is there situations where RawSerializeFn is not called? I’m calling ToJson<T> server side in my service after the request comes in and for some reason when I call ToJson within my service the RawSerializeFn isn’t getting called. But it does get called going to/from the client. I do this to store a complex object in a single column. I have this hooked up in the AppHost.Configure method. Btw I’m using the JsConfig<T>.RawSerializeFn function.

If you can provide a small repro I can take a look.

Stephen Brannan:

Unfortunately it’s kind of hard to create this right now. Perhaps setting it in the Configure method is to late in the process?

Nope, shouldn’t be.

Stephen Brannan:

Hmm ok well for now it’s not a show stopper in this case. I’ll create a sample when I have a chance. Thanks.

Stephen Brannan:

+Demis Bellot I’ve had a chance to revisit this. The RawSerializeFn does not get called if the object is the root object and not a property of a parent object. I have a sample project now. Let me know if you’d like to see it and where should I put it. Thanks!

Can you post a new issue on https://github.com/ServiceStack/Issues if it’s a single file you can post the source code inline otherwise if you have an entire project, add it to a new repo and post the link.

Stephen Brannan:

Thanks, issue is submitted…
https://github.com/ServiceStack/Issues/issues/116