-
Notifications
You must be signed in to change notification settings - Fork 1.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Bug] Exception while de-serializing Uris #1630
Comments
@nik-net This is not a bug in LiteDB, but a limitation in |
Thank you, yes I understand that this is due to ChangeType's inability to convert a string to it's URI representation. Given this known limitation would you be looking to handle this edge case in the code? |
@nik-net Sorry, for whatever reason I didn't realize the |
If the stored value in a document is URI, then this code statement throws error (class BsonMapper.cs)
Modifying this line to
var k = isKEnum ? Enum.Parse(K, el.Key) : K == typeof(Uri) ? new Uri(el.Key) : Convert.ChangeType(el.Key, K);
works.
The text was updated successfully, but these errors were encountered: