# JSON Utility

## JSON Utility

### Create New Json File

<div data-full-width="false"><figure><img src="/files/gxztFHr8LlAQZ0KidYOI" alt=""><figcaption></figcaption></figure></div>

{% hint style="info" %}

### Create New Json File

## Overview

Creates a new, empty JSON object for use in further JSON operations. This node is typically the starting point when building a new JSON structure from scratch. Once created, fields can be added using the various [**Set JSON Field nodes**](/http-pro/httppro-doc/json-set.md)**.**

## Inputs

**None.**

## Outputs

* **Success** – Returns true if the JSON object was successfully created.
* **Json Object** – The newly created empty JSON object, ready for data to be added.
  {% endhint %}

***

### Convert Json To String

<div data-full-width="false"><figure><img src="/files/2JbXXejAwpEyJSemVmtv" alt=""><figcaption></figcaption></figure></div>

{% hint style="info" %}

### Convert Json To String

## Overview

Converts a JSON object into a string format for storage, string manipulation or display. This node serializes the given JSON object into a text-based JSON string. Optionally, you can enable **Pretty Print** to format the output with indentation and line breaks for easier readability.

## Inputs

* **JSON Object** – The JSON object you want to convert into a string.
* **Pretty Print** – If checked, the output string will be human-readable with line breaks and indentation. If unchecked, the result will be compact.

## Outputs

* **Success** – Returns true if the JSON object was successfully converted to a string. Otherwise returns false.
* **JSON String** – The serialized string representation of the input JSON object.
  {% endhint %}

***

### String To Json Object

<div data-full-width="false"><figure><img src="/files/ZwVVjGN1TuFhrmIC4IM4" alt=""><figcaption></figcaption></figure></div>

{% hint style="info" %}

### String To Json Object

## Overview

Parses a JSON-formatted string and converts it into a usable JSON object. This node is typically used to deserialize data that was loaded from a file, received from a server, for quick debugging and testing.

**Note:** The input string must be a valid JSON. If the format is incorrect or malformed, the conversion will fail and return an empty or null object.

## Inputs

* **Raw String Data** – A string containing valid JSON text that you want to parse into a JSON object.

## Outputs

* **Success** – Returns true if the string was successfully parsed into a JSON object. Otherwise, returns false.
* Loaded Json Object - The resulting JSON object that can be used with other JSON nodes.
  {% endhint %}

***

### Remove Json Field

<div data-full-width="false"><figure><img src="/files/f2hp6Kbj29nBu4pOj4Ve" alt=""><figcaption></figcaption></figure></div>

{% hint style="info" %}

### Remove Json Field

## Overview

Removes a specific field (**key–value pair**) from a given JSON object. This node returns a new JSON object identical to the input, except without the specified field. This is useful for cleaning structures before saving, serializing, or sending.

**Note:** If the specified field does not exist, the original object is returned unchanged, and **Success** is set to false.

## Inputs

* **JSON Object** – The input JSON object from which you want to remove a field.
* **Field Name** – The name of the field (**as string**) to remove from the JSON object.

## Outputs

* **Success** – Returns true if the field was found and successfully removed. Otherwise, returns false.
* **New Json Object** - A copy of the input JSON object with the specified field removed (**if found**).
  {% endhint %}

***

### Has Field

<div data-full-width="false"><figure><img src="/files/lNvYPcLyk9gl8k4T1XJK" alt=""><figcaption></figcaption></figure></div>

{% hint style="info" %}
Has Field

## Overview

Checks whether a specified field (**key**) exists within a given JSON object. This node is useful for verifying the presence of data before attempting to retrieve or operate on a specific field, helping prevent errors and ensure safer parsing.

**Note:** This node only checks the top-level of the provided JSON object. It does not search nested objects.

## Inputs

* **JSON Object** – The JSON object in which you want to search for a field.
* **Field to Find** – The name of the field (**as string**) to check for existence.

## Outputs

* **Success** – Returns true if the specified field exists in the JSON object. Otherwise, returns false.
  {% endhint %}


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://doc.uforge.co.uk/http-pro/httppro-doc/json-utility.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
