1 parent 71fb7c6 commit 2eab14cCopy full SHA for 2eab14c
1 file changed
src/ServiceStack.Text/Common/JsReader.cs
@@ -84,9 +84,11 @@ public ParseStringDelegate GetParseFn<T>()
84
if (parseFn != null) return parseFn;
85
}
86
87
- var staticParseMethod = StaticParseMethod<T>.Parse;
88
- if (staticParseMethod != null)
89
- return value => staticParseMethod(Serializer.ParseRawString(value));
+ if (type.IsValueType) {
+ var staticParseMethod = StaticParseMethod<T>.Parse;
+ if (staticParseMethod != null)
90
+ return value => staticParseMethod(Serializer.ParseRawString(value));
91
+ }
92
93
var typeConstructor = DeserializeType<TSerializer>.GetParseMethod(TypeConfig<T>.GetState());
94
if (typeConstructor != null)
0 commit comments