Odisseia 1.21.56
Português do BrasilManual oficial · 1.21.56
Sobre a tradução em inglês

TWorkflowContext.GetJson#

Lê qualquer valor JSON armazenado no workflow.

Declaração#

function GetJson(const Name: String): TJsonValue;

Exemplo#

program Exemplo(Context: TContext);
uses Odisseia.Json;
var
  Workflow: TWorkflowContext;
  Document: TJson;
  Value: TJsonValue;
begin
  Workflow := Context.Workflow;
  Document := TJson.Create.Parse('{"ok":true}');
  Value := Document.Root;
  Workflow.SetJson('dados', Value);
  WriteLn(Workflow.GetJson('dados').Stringify);
end.

Chave ausente, JSON inválido ou forma incompatível gera erro.

Voltar para TWorkflowContext