public MediaProcessingInfo(JsonData info) { State = info.GetValue <string>("state"); CheckAfterSeconds = info.GetValue <int>("check_after_secs"); ProgressPercent = info.GetValue <int>("progress_percent"); Error = new MediaError(info.GetValue <JsonData>("error")); }
public MediaProcessingInfo(JsonElement info) { if (info.IsNull()) { return; } State = info.GetString("state"); CheckAfterSeconds = info.GetInt("check_after_secs"); ProgressPercent = info.GetInt("progress_percent"); info.TryGetProperty("error", out JsonElement errorValue); Error = new MediaError(errorValue); }