public static Node Parse(string json)
{
string tempStr= json.Split(',')[0];
string docId = tempStr.Split(':')[1];
Node newNode = new Node(docId);
json = json.Split('[')[1];
json = json.Split(']')[0];
var nodeList = json.Split('{');
var versionList = new Dictionary<string,Dictionary<string,string>>();
foreach (string node in nodeList)
{
if (node != "")
{
var propertyList = node.Split(',');
var propList = new Dictionary<string, string>();
foreach (string property in propertyList)
{
string propStr = property.Split('}')[0];
string propName = propStr.Split(':')[0];
string propValue = propStr.Split(':')[1];
propList.Add(propName, propValue);
}
versionList.Add(propList["version"], propList);
newNode.addVersion(propList["version"],propList["sequence"],propList["rev_id"]);
}
}
return newNode;
}