It appears that unflatten does not handle escaped paths correctly if they contain a '.' or whitespace-symbol. If a JObject is flattened via Flatten(), it cannot be restored to its original state using unflatten().
varflattened= JObject.Parse("{\"outer\":{\"inner.path\": 1}}").Flatten();// Returns Dictionary with key = outer['inner.path'] and value = 1, as expectedvarunflattened= flattened.Unflatten()// Returns a nested structure// {// "outer": {// "'inner": {// "path'": 1// }// }//}// Expected result of Unflatten():// {// "outer": {// "inner.path": 1// }//}