Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 12 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -118,15 +118,23 @@ You can convert it to its string representation in JSON or YAML format
by using the static methods `Workflow.toJson` or `Workflow.toYaml` respectively:

```typescript
import { Workflow } from '../src/lib/definitions/workflow';
import {Specification, workflowBuilder} from "@severlessworkflow/sdk-typescript";

const workflowAsJson: string = Workflow.toJson(workflow);
const workflow: Specification.Workflow = workflowBuilder()
//...
.build()

const workflowAsJson: string = Specification.Workflow.toJson(workflow);
```

```typescript
import { Workflow } from '../src/lib/definitions/workflow';
import {Specification, workflowBuilder} from "@severlessworkflow/sdk-typescript";

const workflow: Specification.Workflow = workflowBuilder()
//...
.build()

const workflowAsYaml: string = Workflow.toYaml(workflow);
const workflowAsYaml: string = Specification.Workflow.toYaml(workflow);
```


Expand Down