Page 1 of 1

Have ServiceStack treatEmpty String rather than null

PostPosted: Tue Sep 04, 2018 2:53 pm
by SBarnes
Hi Mike

I am getting a situation with ServiceStack using JsonServiceClient where it is passing a custom DTO where a string property is being set to an empty string ("") but when it deserializes it in the API its being set to null I have tried JsConfig.IncludeNullValues but this makes no difference, any ideas?

Re: Have ServiceStack treatEmpty String rather than null

PostPosted: Wed Nov 21, 2018 8:52 am
by Scott.Pearce
Sorry, can't figure this one out. Try asking over at https://forums.servicestack.net/

Re: Have ServiceStack treatEmpty String rather than null  Topic is solved

PostPosted: Wed Nov 21, 2018 5:03 pm
by SBarnes
Hi Scott

Solved in by having the constructor set the property to an empty string

Thanks for the help.