Opc.Ua.JsonDecoder.ReadField C# (CSharp) Method

ReadField() public method

public ReadField ( string fieldName, object &token ) : bool
fieldName string
token object
return bool
        public bool ReadField(string fieldName, out object token)
        {
            token = null;

            if (String.IsNullOrEmpty(fieldName))
            {
                token = m_stack.Peek();
                return true;
            }

            var context = m_stack.Peek() as Dictionary<string, object>;

            if (context == null || !context.TryGetValue(fieldName, out token))
            {
                return false;
            }

            return true;
        }