Bunny83 / SimpleJSON

A simple JSON parser in C#
MIT License
735 stars 294 forks source link

Current in KeyEnumerator should return string #21

Closed BSarmady closed 6 years ago

BSarmady commented 6 years ago

in

public struct KeyEnumerator {
    ...
    public JSONNode Current { get { return m_Enumerator.Current.Key; } }
    ...
}

Type of Key is string and converting it to JSONNode modify key name and should be

public string Current { get { return m_Enumerator.Current.Key; } }

Bunny83 commented 6 years ago

Yes, you're right ^^. This was most likely a copy & paste error. Thanks, I've fixed it.

The Only point for the struct enumerators is to have a garbage free enumerator which isn't the case when we retrun JSONNode :)