You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Expose the current context / scope as a property from the Utf8JsonReader. #1557
Split off from https://github.com/dotnet/corefx/issues/33967.
The JSON Document requires the concept of in object or in array which the JsonReader tracks and will be made internal to support the document. Should we expose it publically so the caller doesn't have to build their own stack to track this while reading?
The other internal detail that the document object needed is InArray, but that can be worked around by the caller maintaining their own Stack<JsonTokenType>.
namespaceSystem.Text.Json{publicrefpartialstruct Utf8JsonReader
{publicJsonContext Context {get;}// OR one (or both) of thesepublicbool InObject {get;}publicbool InArray {get;}}// OR Scope?// Can't call it state, since we already have such a concept and overloading it would be confusingpublicenumJsonContext:byte{Object,Array,None,Value,// Remove? OR split into specific JSON primitives, like String, Number, etc.?}}
Activity