progress on improving responses

This commit is contained in:
Sem van der Hoeven
2020-09-25 14:30:33 +02:00
parent 23846b14bc
commit d3a37d0238
4 changed files with 68 additions and 59 deletions

View File

@@ -53,7 +53,7 @@ namespace RH_Engine
public static string GetSerial(string json)
{
dynamic jsonData = JsonConvert.DeserializeObject(json);
return jsonData.serial;
return jsonData.data.data.serial;
}
public static string GetID(string json)
@@ -73,7 +73,12 @@ namespace RH_Engine
return null;
}
public static string GetRouteID(string json)
/// <summary>
/// method to get the uuid from requests for adding a node,route or road
/// </summary>
/// <param name="json">the json response froo the server</param>
/// <returns>the uuid of the created object</returns>
public static string GetResponseUuid(string json)
{
dynamic jsonData = JsonConvert.DeserializeObject(json);
if (jsonData.data.status == "ok")