runtime
runtime copied to clipboard
Issue in corefx/src/System.Json/src/System/Json/JavaScriptReader.cs ?
Was just reading the code and it appears to me there may be a bug in ReadCore()
It seems to me that when returning empty array ([]) and empty object ({}) this function does miss the ToArray() call, then it will return either a List
The JavaScriptReader type is internal so the return values from ReadCore only have to match the expectations of the immediate callers, they aren't contracted or documented. The only use of the type is in JsonValue which inspects the return value of ReadCore and checks for IEnumerable<object> which both array and List
Thanks for your response. False alert (sorry for that)