---
category: [Administration & Integrations, Platform and Product Extensions, Platform and Product Extensions/Integration, Administration & Integrations/Custom Integrations & Apps, Platform and Product Extensions/Workday Extend]
keyword: [Integrate, Workday Integration, Orchestrate for Integrations, Orchestration, Orchestration Builder]
nav: wcp_docs
parent_url: /wcp_docs/
title: >- 
  Reference: Json Member Functions
layout: subsection
---

<a id="d398e202"></a>
<b>Instance Type: Json</b>

<table><thead><tr><th>Name</th><th>Description</th></tr></thead><tbody><tr><td>addBooleanValue</td><td>Arguments: <ul><li>name (String)
</li><li>value (Boolean)
</li></ul> <p>Return Type:</p><ul><li>Json
</li></ul> Returns a new JSON document with an additional field of the specified name containing a corresponding Boolean of the specified value. If the input isn't a JSON Array or a JSON Object, the new field and value aren't added and the document is returned as is.</td></tr><tr><td>addJsonValue</td><td>Arguments: <ul><li>name (String)
</li><li>value (Json)
</li></ul> <p>Return Type:</p><ul><li>Json
</li></ul> Returns a new JSON document with an additional field of the specified name containing corresponding JSON of the specified value. If the input isn't a JSON Array or a JSON Object, the new field and value aren't added and the document is returned as is.</td></tr><tr><td>addNumberValue</td><td>Arguments: <ul><li>name (String)
</li><li>value (Number)
</li></ul> <p>Return Type:</p><ul><li>Json
</li></ul> Returns a new JSON document with an additional field of the specified name containing a corresponding number of the specified value. If the input isn't a JSON Array or a JSON Object, the new field and value aren't added and the document is returned as is.</td></tr><tr><td>addStringValue</td><td>Arguments: <ul><li>name (String)
</li><li>value (String)
</li></ul> <p>Return Type:</p><ul><li>Json
</li></ul> Returns a new JSON document with an additional field of the specified name containing a corresponding string of the specified value. If the input isn't a JSON Array or a JSON Object, the new field and value aren't added and the document is returned as is.</td></tr><tr><td>arrayAtJsonPath</td><td>Arguments: <ul><li>path (String)
</li></ul> <p>Return Type:</p><ul><li>Json
</li></ul> Returns the JSON array at the specified JsonPath, if one exists, in a new JSON document. Throws an exception if there's a value at the path, but it isn't an array.</td></tr><tr><td>arrayAtJsonPathWithDefault</td><td>Arguments: <ul><li>path (String)
</li><li>defaultValue (Json)
</li></ul> <p>Return Type:</p><ul><li>Json
</li></ul> Returns the JSON array at the specified JSON path, if one exists, in a new JSON document. Otherwise assigns the specified default JSON document. Throws an exception if there's a value at the path, but it isn't an array.</td></tr><tr><td>assertValid</td><td>Arguments: <ul><li>None
</li></ul> <p>Return Type:</p><ul><li>Json
</li></ul> Returns the JSON document itself if it is valid. Otherwise, throws an exception.</td></tr><tr><td>bigDecimalAtJsonPath</td><td>Arguments: <ul><li>path (String)
</li></ul> <p>Return Type:</p><ul><li>BigDecimal
</li></ul> Returns the value at the specified JSON path as a BigDecimal type if the value exists and is a JSON number or a number in a JSON string. Otherwise, throws an exception.</td></tr><tr><td>booleanAtJsonPath</td><td>Arguments: <ul><li>path (String)
</li></ul> <p>Return Type:</p><ul><li>Boolean
</li></ul> Returns the value at the specified JsonPath if the value exists and is a boolean. Otherwise throws an exception.</td></tr><tr><td>booleanAtJsonPathWithDefault</td><td>Arguments: <ul><li>path (String)
</li><li>defaultValue (Boolean)
</li></ul> <p>Return Type:</p><ul><li>Boolean
</li></ul> Returns the boolean value at the specified JsonPath if the value exists or the specified default if it doesn't. Throws an exception if there's a value at the path but it isn't a boolean.</td></tr><tr><td>booleansAtJsonPath</td><td>Arguments: <ul><li>path (String)
</li></ul> <p>Return Type:</p><ul><li>Boolean
</li></ul> Returns all the boolean values at a specified JsonPath, provided all the matching values are booleans.</td></tr><tr><td>convertToXml</td><td>Arguments: <ul><li>None
</li></ul> <p>Return Type:</p><ul><li>Xml
</li></ul> Converts a JSON document to an XML document. XML namespaces and attributes aren't currently supported. Every JSON field is converted to an XML tag.</td></tr><tr><td>convertToXml1</td><td>Arguments: <ul><li>rootName (string)
</li></ul> <p>Return Type:</p><ul><li>Xml
</li></ul> Converts a JSON document to an XML document with the specified root name. XML namespaces and attributes aren't currently supported. Every JSON field is converted to an XML tag.</td></tr><tr><td>convertToXml2</td><td>Arguments: <ul><li>rootName (string)
</li><li>floatingArrayName (string)
</li></ul> <p>Return Type:</p><ul><li>Xml
</li></ul> Converts a JSON document to an XML document with the specified root name and the specifed floating array name. XML namespaces and attributes aren't currently supported. Every JSON field is converted to an XML tag.</td></tr><tr><td>convertToXml3</td><td>Arguments: <ul><li>rootName (string)
</li><li>floatingArrayName (string)
</li><li>floatingObjectName (string)
</li></ul> <p>Return Type:</p><ul><li>Xml
</li></ul> Converts a JSON document to an XML document with the specified root name, the specifed floating array name, and the specified floating object name. XML namespaces and attributes aren't currently supported. Every JSON field is converted to an XML tag.</td></tr><tr><td>countItemsAtJsonPath</td><td>Arguments: <ul><li>path (String)
</li></ul> <p>Return Type:</p><ul><li>Number
</li></ul> Returns a count of the number of items that match the specified JsonPath.</td></tr><tr><td>distinct</td><td>Arguments: <ul><li>path (StringType)
</li><li>keyPath (StringType)
</li></ul> Return type: <ul><li>Json
</li></ul> Returns a collection of distinct JSON values as a JSON array. The collection is selected by the specified path. Uniqueness is tested by selecting a value within each item of the collection using the specified key path.</td></tr><tr><td>flatten</td><td>Arguments: <ul><li>None
</li></ul> <p>Return Type:</p><ul><li>Json
</li></ul> Returns JSON array flattened by 1 level.</td></tr><tr><td>includeCharactersUsingList</td><td>Arguments: <ul><li>inclusionList (StringListType)
</li><li>defaultReplacement (StringType)
</li></ul> Return type: <ul><li>Json
</li></ul> Returns a JSON file, replacing any characters not present in the inclusion list with the specified replacement. Characters that are on the inclusion list are returned unchanged. JSON control characters are returned unchanged.</td></tr><tr><td>indices</td><td>Arguments: <ul><li>path (String)
</li></ul> <p>Return Type:</p><ul><li>NumberList
</li></ul> Returns all the array indices that match a specified path if the match is an array element.</td></tr><tr><td>isNullAtJsonPath</td><td>Arguments: <ul><li>path (String)
</li></ul> <p>Return Type:</p><ul><li>Boolean
</li></ul> Returns true if a Json null exists at the specified JsonPath. Returns false if there's a non-null value at the path or if the path doesn't match anything.</td></tr><tr><td>isValid</td><td>Arguments: <ul><li>None
</li></ul> <p>Return Type:</p><ul><li>Boolean
</li></ul> Returns true if the JSON document is valid.</td></tr><tr><td>isValueAtJsonPath</td><td>Arguments: <ul><li>path (String)
</li></ul> <p>Return Type:</p><ul><li>Boolean
</li></ul> Returns true if a value exists at the specified JsonPath.</td></tr><tr><td>iterator</td><td>Arguments: <ul><li>path (String)
</li></ul> <p>Return Type:</p><ul><li>JsonIterator
</li></ul> Returns an iterator of JSON values matching the specified JsonPath as JsonType instances.</td></tr><tr><td>iterator</td><td>Arguments: <ul><li>path (String)
</li><li>batchSize (Number)
</li></ul> <p>Return Type:</p><ul><li>JsonIterator
</li></ul> Returns an iterator of JSON values matching the specified JsonPath as JsonType instances, batched into JSON arrays of the specified size.</td></tr><tr><td>jsonDataAtJsonPath</td><td>Arguments: <ul><li>path (String)
</li></ul> <p>Return Type:</p><ul><li>Json
</li></ul> Returns the value at the specified JsonPath in a new JsonType document. No type checking is done on the value extracted.</td></tr><tr><td>jsonKeyValueIterator</td><td>Arguments: <ul><li>path (String)
</li></ul> <p>Return Type:</p><ul><li>JsonKeyValueIterator
</li></ul> Returns an iterator of the JSON document's key-value pairs, starting at the specified path. Throws an exception if the given path doesn't point to a JSON object.</td></tr><tr><td>jsonKeyValueIterator</td><td>Arguments: <ul><li>None
</li></ul> <p>Return Type:</p><ul><li>JsonKeyValueIterator
</li></ul> Returns an iterator of the JSON document's key-value pairs, starting at the root.</td></tr><tr><td>numberAtJsonPath</td><td>Arguments: <ul><li>path (String)
</li></ul> <p>Return Type:</p><ul><li>Number
</li></ul> Returns the value at the specified JsonPath if the value exists and is a number. Throws an exception if no value exists or a value exists but isn't a number.</td></tr><tr><td>numberAtJsonPathWithDefault</td><td>Arguments: <ul><li>path (String)
</li><li>defaultValue (Number)
</li></ul> <p>Return Type:</p><ul><li>Number
</li></ul> Returns the value at the specified JsonPath if the value exists and is a number. Otherwise returns the specified default. Throws an exception if a value exists but isn't a number.</td></tr><tr><td>numbersAtJsonPath</td><td>Arguments: <ul><li>path (String)
</li></ul> <p>Return Type:</p><ul><li>NumberList
</li></ul> Returns all the number values in the array at a specified JsonPath.</td></tr><tr><td>objectAtJsonPath</td><td>Arguments: <ul><li>path (String)
</li></ul> <p>Return Type:</p><ul><li>Json
</li></ul> Returns a Json document containing the Json object at the specified JsonPath.</td></tr><tr><td>objectAtJsonPathWithDefault</td><td>Arguments: <ul><li>path (String)
</li><li>defaultValue (Json)
</li></ul> <p>Return Type:</p><ul><li>Json
</li></ul> Returns a Json document containing the Json object at the specified JsonPath. If no object exists, returns the specified default JsonType document. Throws an exception if a value exists at the path but it isn't an object.</td></tr><tr><td>properties</td><td>Arguments: <ul><li>path (String)
</li></ul> <p>Return Type:</p><ul><li>StringList
</li></ul> Returns as strings all the property names and array indices that match the specified path. Returns an empty list if the path doesn't match anything.</td></tr><tr><td>propertyNames</td><td>Arguments: <ul><li>path (String)
</li></ul> <p>Return Type:</p><ul><li>StringList
</li></ul> Returns all the property names that match the specified path if the match isn't an item in an array.</td></tr><tr><td>replaceAndIncludeCharacters</td><td>Arguments: <ul><li>mapping (StringMapType)
</li><li>defaultReplacement (StringType)
</li></ul> Return type: <ul><li>Json
</li></ul> Returns a JSON file with characters replaced according to the provided mapping. If a character is missing from the provided document, the default string is returned in its place. JSON control characters are returned unchanged.</td></tr><tr><td>replaceCharactersUsingMapping</td><td>Arguments: <ul><li>mapping (StringMapType)
</li></ul> Return types: <ul><li>Json
</li></ul> Returns a JSON file with characters replaced according to the provided mapping. If a character isn't mapped, it's returned unchanged.</td></tr><tr><td>remove</td><td>Arguments: <ul><li>path (String)
</li></ul> <p>Return Type:</p><ul><li>Json
</li></ul> Returns a JSON document with the properties at the specified path removed.</td></tr><tr><td>stringAtJsonPath</td><td>Arguments: <ul><li>path (String)
</li></ul> <p>Return Type:</p><ul><li>String
</li></ul> Returns the value at the specified JsonPath if the value exists and is a string. Throws an exception if no value exists or a value exists but isn't a string.</td></tr><tr><td>stringAtJsonPathOrEmptyString</td><td>Arguments: <ul><li>path (String)
</li></ul> <p>Return Type:</p><ul><li>String
</li></ul> Returns the value at the specified JSON path if the path points to a string value. Otherwise returns an empty string. Provides a safe way to extract values without throwing exceptions when the path doesn't exist.</td></tr><tr><td>stringAtJsonPathWithDefault</td><td>Arguments: <ul><li>path (String)
</li><li>defaultValue (String)
</li></ul> <p>Return Type:</p><ul><li>String
</li></ul> Returns the value at the specified JsonPath if the value exists and is a string. Otherwise returns the specified default. Throws an exception if a value exists but isn't a string.</td></tr><tr><td>stringsAtJsonPath</td><td>Arguments: <ul><li>path (String)
</li></ul> <p>Return Type:</p><ul><li>StringList
</li></ul> Returns all the strings values at the specified JsonPath.</td></tr><tr><td>textDataAtJsonPath</td><td>Arguments: <ul><li>path (String)
</li></ul> <p>Return Type:</p><ul><li>Text
</li></ul> Returns the value at the specified JsonPath in a new TextType document. No type checking is done on the value extracted.</td></tr><tr><td>toXwwwFormUrlEncoded</td><td>Arguments: <ul><li>None
</li></ul> <p>Return Type:</p><ul><li>Text
</li></ul> Returns a Json object converted into an x-www-form-url-encoded string housed in a text instance. Ignores nonprimitive values in the root object.</td></tr><tr><td>valuesAtJsonPathAsArray</td><td>Arguments: <ul><li>path (String)
</li></ul> <p>Return Type:</p><ul><li>Json
</li></ul> Returns an array of all the values that match the specified path. Returns an empty array if no values are matched. Use this function to filter the values in an array. Example: return an array of primitive values only.</td></tr></tbody></table><br/>

