private bool TryParseFeatureCollection(RavenJObject obj, out object result) { result = null; string typeString; if (TryParseTypeString(obj, out typeString) && typeString.ToLowerInvariant() == "featurecollection") { RavenJToken feats; if (obj.TryGetValue("features", out feats)) { var features = feats as RavenJArray; if (features != null) { var temp = new object[features.Length]; for (var index = 0; index < features.Length; index++) { var geometry = features[index]; if (!TryParseFeature((RavenJObject)geometry, out temp[index])) { return(false); } } result = _shapeConverter.ToFeatureCollection(temp); return(true); } } } return(false); }