---
id: object/codeunit/5460
type: object
title: Codeunit 5460 "Json"
summary: Codeunit 5460 "Json" in System Application (System.Text.Json). 21 public procedures. Introduced in BC24, still in BC30, changed in BC26.
tier: official
language: en
tags:
  - codeunit
  - system application
versions:
  introduced: "24"
  last_changed: "26"
  deprecated: null
review:
  state: derived
  by: null
  at: null
  flags: []
generated:
  at: "2026-10-11T00:31:51.816Z"
  pipeline: 0.2.0
  prompts: {}
  input_hash: a0037c7de752100bc8f8958ba9eadea985290fee746096e8fa179992c4e85371
evidence:
  - kind: code
    url: https://github.com/microsoft/BCApps/blob/ea08af5ef2d6a9b5c5af4a029288abbe2c883220/src/System%20Application/App/Json/src/Json.Codeunit.al
    title: src/System Application/App/Json/src/Json.Codeunit.al (releases/29.x)
    date: null
    commit: ea08af5ef2d6a9b5c5af4a029288abbe2c883220
    t: null
    quote: null
links:
  learn: []
  objects: []
  features: []
  topics: []
  localizations: []
  videos: []
  posts: []
  guidelines: []
object_type: codeunit
object_id: 5460
name: Json
namespace: System.Text.Json
app: System Application
extends: null
first_version: "24"
last_version: "30"
present_in:
  - "24"
  - "25"
  - "26"
  - "27"
  - "28"
  - "29"
  - "30"
changed_in:
  - "26"
source_major: "29"
obsolete: null
countries: []
ms_search_form_ids: []
counts:
  fields: 0
  procedures: 21
  events: 0
  subscribers: 0
relations:
  out: 0
  referenced_by: 0
  pages: 0
  extended_by: 0
  event_subscribers: 0
  calls: 1
  called_by: 3
  implements: 0
---

# Codeunit 5460 "Json"

> Codeunit 5460 "Json" in System Application (System.Text.Json). 21 public procedures. Introduced in BC24, still in BC30, changed in BC26.

System Application · System.Text.Json · BC24-30 · [source at ea08af5e](https://github.com/microsoft/BCApps/blob/ea08af5ef2d6a9b5c5af4a029288abbe2c883220/src/System%20Application/App/Json/src/Json.Codeunit.al) · facts from BC29

## Properties

| Property | Value |
|---|---|
| Access | Public |

## Procedures

- `InitializeCollection(JSONString: Text)`: Initializes the JSON array with the specified JSON string.
- `InitializeObject(JSONString: Text)`: Initializes the JSON object with the specified JSON string.
- `GetCollectionCount(): Integer`: Returns the number of elements in the JSON array.
- `GetCollectionAsText(): Text`: Returns the JSON array in text format.
- `GetCollectionAsText(Indentation: Boolean): Text`: Returns the JSON array in text format.
- `GetCollection(): JsonArray`: Returns the JSON array.
- `GetObjectAsText(): Text`: Returns the JSON object in text format.
- `GetObject(): JsonObject`: Returns the JSON object.
- `GetObjectFromCollectionByIndex(Index: Integer; var JsonObjectTxt: Text): Boolean`: Returns the JSON object at the specified index in the JSON array.
- `GetValueAndSetToRecFieldNo(RecordRef: RecordRef; PropertyPath: Text; FieldNo: Integer): Boolean`: Gets the value at the specified property path in the JSON object and sets it to the specified record field.
- `GetPropertyValueByName(PropertyName: Text; var Value: Variant): Boolean`: Gets the value at the specified property name in the JSON object.
- `GetStringPropertyValueByName(PropertyName: Text; var Value: Text): Boolean`: Gets the text value at the specified property name in the JSON object.
- `GetEnumPropertyValueFromJObjectByName(PropertyName: Text; var Value: Option): Boolean`: Gets the option value at the specified property name in the JSON object.
- `GetBoolPropertyValueFromJObjectByName(PropertyName: Text; var Value: Boolean): Boolean`: Gets the boolean value at the specified property name in the JSON object.
- `GetDecimalPropertyValueFromJObjectByName(PropertyName: Text; var Value: Decimal): Boolean`: Gets the decimal value at the specified property name in the JSON object.
- `GetIntegerPropertyValueFromJObjectByName(PropertyName: Text; var Value: Integer): Boolean`: Gets the integer value at the specified property name in the JSON object.
- `GetGuidPropertyValueFromJObjectByName(PropertyName: Text; var Value: Guid): Boolean`: Gets the Guid value at the specified property name in the JSON object.
- `ReplaceOrAddJPropertyInJObject(PropertyName: Text; Value: Variant): Boolean`: Replace or add the specified property in the JSON object.
- `AddJObjectToCollection(Value: Text): Boolean`: Add the the JSON object to the JSON array.
- `RemoveJObjectFromCollection(Index: Integer): Boolean`: Remove the JSON object at the specified index in the JSON array.
- `ReplaceJObjectInCollection(Index: Integer; Value: Text): Boolean`: Replace the specified JSON object in the JSON array.

## Calls

From the extracted call graph of BC29 (graphify-al on the snapshot checkout): calls whose target is known from a declared type or an `Object::"Name"` argument. Interface dispatch and calls through events are not counted, so the list is not complete.

- [Codeunit 5461 "Json Impl."](../codeunit/5461.md) (20 calls: `AddJObjectToCollection → AddJObjectToCollection`, `GetBoolPropertyValueFromJObjectByName → GetBoolPropertyValueFromJObjectByName`, `GetCollection → GetCollection`, …)

## Called by

- [Codeunit 324 "No. Series Copilot Impl."](../codeunit/324.md) (20 calls: `CheckIfCompletionMeetAllRequirements → GetCollectionCount`, `CheckIfCompletionMeetAllRequirements → GetObjectFromCollectionByIndex`, `CheckIfCompletionMeetAllRequirements → InitializeCollection`, …)
- [Codeunit 8333 "VS Code Integration Impl."](../codeunit/8333.md) (3 calls: `GetDependenciesAsSerializedJsonArray → AddJObjectToCollection`, `GetDependenciesAsSerializedJsonArray → GetCollectionAsText`, `GetDependenciesAsSerializedJsonArray → InitializeCollection`)
- [Codeunit 4314 "Agent Task Log Entry"](../codeunit/4314.md) (2 calls: `FormatJsonTextForRichContent → GetCollectionAsText`, `FormatJsonTextForRichContent → InitializeCollection`)

## Across versions

- Present in: BC24-30
- Changed (declaration) in: BC26

Source: AL metadata extracted from the code (names, ids, signatures, properties); no code bodies (D10).

## Ask your agent

Procedure bodies are not stored here (D10). The call sections above are our own, per object, from the BC29 call graph. For a procedure body or the calls of one procedure, ask bc-code-atlas (external, by Stefan Maron, MIT; default corpus w1-28), which the bc-observatory plugin connects: `bcatlas_resolve_node(object_type: "codeunit", object_name: "Json")`, then `bcatlas_get_procedure_body` or `bcatlas_get_neighbors` on the returned id.
