Couchbase.Management.CouchbaseCluster.validateDesignDocument C# (CSharp) Method

validateDesignDocument() private method

private validateDesignDocument ( string document, Newtonsoft.Json.Linq.JObject &jObj ) : void
document string
jObj Newtonsoft.Json.Linq.JObject
return void
        private void validateDesignDocument(string document, out JObject jObj)
        {
            try
            {
                jObj = JObject.Parse(document);
            }
            catch (JsonReaderException)
            {
                throw new ArgumentException("Document was not valid JSON");
            }

            if (jObj["views"] == null) throw new ArgumentException("Design document must contain 'views' property");
        }