JsonObject*
SamiNAThermMeasure::asJsonObject() {
    JsonObject *pJsonObject = new JsonObject();
    pJsonObject->Construct();

    
    JsonString *pTimeKey = new JsonString(L"time");
    pJsonObject->Add(pTimeKey, toJson(getPTime(), "Integer", ""));

    
    JsonString *pTemperatureKey = new JsonString(L"temperature");
    pJsonObject->Add(pTemperatureKey, toJson(getPTemperature(), "Float", ""));

    
    JsonString *pSetpoint_tempKey = new JsonString(L"setpoint_temp");
    pJsonObject->Add(pSetpoint_tempKey, toJson(getPSetpointTemp(), "Float", ""));

    
    return pJsonObject;
}
JsonObject*
SamiSolution::asJsonObject() {
    JsonObject *pJsonObject = new JsonObject();
    pJsonObject->Construct();

    JsonString *pCostsKey = new JsonString(L"costs");
    pJsonObject->Add(pCostsKey, toJson(getPCosts(), "Integer", ""));

    JsonString *pDistanceKey = new JsonString(L"distance");
    pJsonObject->Add(pDistanceKey, toJson(getPDistance(), "Integer", ""));

    JsonString *pTimeKey = new JsonString(L"time");
    pJsonObject->Add(pTimeKey, toJson(getPTime(), "Long", ""));

    JsonString *pTransport_timeKey = new JsonString(L"transport_time");
    pJsonObject->Add(pTransport_timeKey, toJson(getPTransportTime(), "Long", ""));

    JsonString *pMax_operation_timeKey = new JsonString(L"max_operation_time");
    pJsonObject->Add(pMax_operation_timeKey, toJson(getPMaxOperationTime(), "Long", ""));

    JsonString *pWaiting_timeKey = new JsonString(L"waiting_time");
    pJsonObject->Add(pWaiting_timeKey, toJson(getPWaitingTime(), "Long", ""));

    JsonString *pNo_vehiclesKey = new JsonString(L"no_vehicles");
    pJsonObject->Add(pNo_vehiclesKey, toJson(getPNoVehicles(), "Integer", ""));

    JsonString *pNo_unassignedKey = new JsonString(L"no_unassigned");
    pJsonObject->Add(pNo_unassignedKey, toJson(getPNoUnassigned(), "Integer", ""));

    JsonString *pRoutesKey = new JsonString(L"routes");
    pJsonObject->Add(pRoutesKey, toJson(getPRoutes(), "SamiRoute", "array"));

    JsonString *pUnassignedKey = new JsonString(L"unassigned");
    pJsonObject->Add(pUnassignedKey, toJson(getPUnassigned(), "SamiSolution_unassigned", ""));

    return pJsonObject;
}