public static string[] PathsFrom(ICollection nodes)
{
var paths = new string[nodes != null ? nodes.Count : 0];
if (paths.Length > 0)
{
Debug.Assert(nodes != null);
int i = 0;
foreach (JsonPathNode node in nodes)
paths[i++] = node.Path;
}
return paths;
}