# IWeb2Json

> Attestation type that fetches JSON over HTTP, applies a jq filter, and returns ABI-encoded data.

> For the complete documentation index, see [llms.txt](/llms.txt). Markdown versions of documentation pages are available by appending `.md` to the page URL.

Source: https://dev.flare.network/fdc/reference/IWeb2Json

The `Web2Json` attestation type fetches data from a URL, post-processes the returned JSON with a `jq` filter, and returns the result as ABI-encoded bytes. The interface only declares the request/response/proof structs — verification is exposed via [`IFdcVerification.verifyWeb2Json`](/fdc/reference/IFdcVerification#verifyweb2json).

Sourced from `IWeb2Json.sol` on [GitHub](https://github.com/flare-foundation/flare-smart-contracts-v2/blob/main/contracts/userInterfaces/IWeb2Json.sol).

## Structs[​](#structs "Direct link to Structs")

### Request[​](#request "Direct link to Request")

Top-level request.

```
struct Request {    bytes32 attestationType;    bytes32 sourceId;    bytes32 messageIntegrityCode;    RequestBody requestBody;}
```

### Response[​](#response "Direct link to Response")

Top-level response.

```
struct Response {    bytes32 attestationType;    bytes32 sourceId;    uint64 votingRound;    uint64 lowestUsedTimestamp;    RequestBody requestBody;    ResponseBody responseBody;}
```

### Proof[​](#proof "Direct link to Proof")

Top-level proof.

```
struct Proof {    bytes32[] merkleProof;    Response data;}
```

### RequestBody[​](#requestbody "Direct link to RequestBody")

```
struct RequestBody {    string url;    string httpMethod;   // "GET" | "POST" | "PUT" | "PATCH" | "DELETE"    string headers;      // "{}" if none    string queryParams;  // "{}" if none    string body;         // "{}" if none    string postProcessJq;    string abiSignature;}
```

### ResponseBody[​](#responsebody "Direct link to ResponseBody")

```
struct ResponseBody {    bytes abiEncodedData;}
```

Decode `abiEncodedData` into the struct described by your `abiSignature` to consume the post-processed payload on-chain.
