[backend/federation] Fix deserialization of raw value types in ASSerializer
This commit is contained in:
parent
d6a8282a18
commit
5042fab8df
1 changed files with 9 additions and 0 deletions
|
@ -32,6 +32,15 @@ public static class ASSerializer
|
||||||
return obj.ToObject<T?>();
|
return obj.ToObject<T?>();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (reader.TokenType == JsonToken.String && typeof(T).IsAssignableFrom(reader.ValueType))
|
||||||
|
return reader.Value;
|
||||||
|
|
||||||
|
if (reader.TokenType == JsonToken.Integer && typeof(T).IsAssignableFrom(reader.ValueType))
|
||||||
|
return reader.Value;
|
||||||
|
|
||||||
|
if (reader.TokenType == JsonToken.Float && typeof(T).IsAssignableFrom(reader.ValueType))
|
||||||
|
return reader.Value;
|
||||||
|
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue