mirror of
https://github.com/ICDSystems/ICD.Common.Utils.git
synced 2026-02-16 05:05:05 +00:00
fix: JsonReader GetValueAsString ignores token type
This commit is contained in:
@@ -148,11 +148,7 @@ namespace ICD.Common.Utils.Extensions
|
|||||||
if (extends == null)
|
if (extends == null)
|
||||||
throw new ArgumentNullException("extends");
|
throw new ArgumentNullException("extends");
|
||||||
|
|
||||||
if (extends.TokenType == JsonToken.String || extends.TokenType == JsonToken.Null)
|
return extends.Value as string;
|
||||||
return extends.Value as string;
|
|
||||||
|
|
||||||
string message = string.Format("Token {0} {1} is not {2}", extends.TokenType, extends.Value, JsonToken.String);
|
|
||||||
throw new InvalidCastException(message);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
|
|||||||
Reference in New Issue
Block a user