Closed arteny closed 4 months ago
Hi - thanks for the feedback - I'll take a look at this when time permits.
Hi - thanks for the feedback - I'll take a look at this when time permits.
Waiting too much for this. Now it is deserializing as "[UNINITIALIZED]" when it is a property of object
btw I found workaround adding this method to all of my ValueObject's:
public static MyValueObject Parse(string value) => From(value);
I'm glad you've found a workaround. Apologies for the delay in fixing this.
Hi @arteny - could you check the latest version of Vogen? It should fix this issue as it now generates Parse
itself
@arteny - I just checked myself. It seems that primitive numers such as int
etc. are support, however, string
is not.
I think I need to generate a static constructor whose body is JsConfig<Name>.DeSerializeFn = Name.From;
It looks like it calls any method that is public static X Parse(string s)
. This works, by default, with types like int
because they already have that method and it is hoisted up to the wrapper.
I'll add another entry to the Conversions
attribute to allow for ServiceStack.Text. When it is set, Vogen will generate the method above. Will hopefully have something shortly.
This has now been implemented and will be in the next release.
Describe the feature
Pls add it's support for serialization. Strings deserialized as null now.