Home Explore Blog CI



docker

content/reference/api/extensions-sdk/ExecResult.md
060ebe1bf7df24e6b08ac9a9b0bf2ac74989cc13a8a68d3000000003000006ab
---
title: "Interface: ExecResult"
description: Docker extension API reference
keywords: Docker, extensions, sdk, API, reference
aliases:
 - /desktop/extensions-sdk/dev/api/reference/interfaces/ExecResult/
 - /extensions/extensions-sdk/dev/api/reference/interfaces/ExecResult/
---

**`Since`**

0.2.0

## Hierarchy

- [`RawExecResult`](RawExecResult.md)

  ↳ **`ExecResult`**

## Methods

### lines

▸ **lines**(): `string`[]

Split output lines.

#### Returns

`string`[]

The list of lines.

___

### parseJsonLines

▸ **parseJsonLines**(): `any`[]

Parse each output line as a JSON object.

#### Returns

`any`[]

The list of lines where each line is a JSON object.

___

### parseJsonObject

▸ **parseJsonObject**(): `any`

Parse a well-formed JSON output.

#### Returns

`any`

The JSON object.

## Properties

### cmd

• `Optional` `Readonly` **cmd**: `string`

#### Inherited from

[RawExecResult](RawExecResult.md).[cmd](RawExecResult.md#cmd)

___

### killed

• `Optional` `Readonly` **killed**: `boolean`

#### Inherited from

[RawExecResult](RawExecResult.md).[killed](RawExecResult.md#killed)

___

### signal

• `Optional` `Readonly` **signal**: `string`

#### Inherited from

[RawExecResult](RawExecResult.md).[signal](RawExecResult.md#signal)

___

### code

• `Optional` `Readonly` **code**: `number`

#### Inherited from

[RawExecResult](RawExecResult.md).[code](RawExecResult.md#code)

___

### stdout

• `Readonly` **stdout**: `string`

#### Inherited from

[RawExecResult](RawExecResult.md).[stdout](RawExecResult.md#stdout)

___

### stderr

• `Readonly` **stderr**: `string`

#### Inherited from

[RawExecResult](RawExecResult.md).[stderr](RawExecResult.md#stderr)

Chunks
a4ca01a5 (1st chunk of `content/reference/api/extensions-sdk/ExecResult.md`)
Title: ExecResult Interface Documentation
Summary
This document describes the `ExecResult` interface, which extends `RawExecResult` and provides methods for parsing the output of executed commands. It includes methods for splitting the output into lines (`lines`), parsing each line as a JSON object (`parseJsonLines`), and parsing the entire output as a single JSON object (`parseJsonObject`). It also inherits properties from `RawExecResult` such as `cmd`, `killed`, `signal`, `code`, `stdout`, and `stderr`.