---
id: post/aardvarklabs-blog/1826
type: post
title: How to Work with JSON in Business Central’s AL Code
summary: Working with JSON in Business Central AL involves understanding JSON structures (values, objects, arrays) and using JsonObject, JsonArray, and JsonToken types to parse incoming JSON data and export records as JSON. This is essential for API integrations, AI systems, and computer-to-computer data exchanges.
tier: community
language: en
tags:
  - json
  - al code
  - api integration
  - data exchange
  - file handling
  - import export
system: development
review:
  state: reviewed
  by: opus
  at: "2026-10-08T02:00:42.586Z"
  flags: []
generated:
  at: "2026-10-08T01:26:53.141Z"
  pipeline: 0.2.0
  prompts:
    extract-post: 1
  input_hash: c17e477500c4f462f94983848745f715886740da607494f3f21b0b4ee388744a
evidence:
  - kind: blog
    url: https://aardvarklabs.blog/2025/06/06/how-to-work-with-json-in-business-centrals-al-code/
    title: How to Work with JSON in Business Central’s AL Code
    date: "2025-06-06"
    commit: null
    t: null
    quote: null
  - kind: blog
    url: https://aardvarklabs.blog/2025/06/06/how-to-work-with-json-in-business-centrals-al-code/
    title: How to Work with JSON in Business Central’s AL Code
    date: "2025-06-06"
    commit: null
    t: null
    quote: REST APIs use JSON and are generally simpler, human readable, and leaner.
  - kind: blog
    url: https://aardvarklabs.blog/2025/06/06/how-to-work-with-json-in-business-centrals-al-code/
    title: How to Work with JSON in Business Central’s AL Code
    date: "2025-06-06"
    commit: null
    t: null
    quote: Working with JSON data is critically important as we progress into more complex AI and data integration systems.
links:
  learn: []
  objects: []
  features: []
  topics: []
  localizations: []
  videos: []
  posts: []
  guidelines: []
post_id: "1826"
source_id: aardvarklabs-blog
source_name: Aardvark Labs
url: https://aardvarklabs.blog/2025/06/06/how-to-work-with-json-in-business-centrals-al-code/
published_at: "2025-06-06T12:00:00.000Z"
author: Marcel Chabot
full_text: false
words: 1754
quotes:
  - text: REST APIs use JSON and are generally simpler, human readable, and leaner.
    why_it_matters: Explains why JSON is the standard for modern API communication in Business Central
  - text: Working with JSON data is critically important as we progress into more complex AI and data integration systems.
    why_it_matters: Highlights the strategic importance of JSON skills for developers building AI and integration solutions
code_objects_mentioned:
  - other JsonObject
  - other JsonArray
  - other JsonToken
  - other Temp Blob
  - other TextBuilder
systems:
  - development
  - integration
versions_mentioned: []
preview:
  embeddable: true
  frame_url: https://aardvarklabs.blog/2025/06/06/how-to-work-with-json-in-business-centrals-al-code/embed/
  image: https://aardvarklabs.blog/wp-content/uploads/2025/06/09a7bd70-55a4-49e7-95be-ec6896fe0825.jpeg
  image_alt: null
  image_w: 1024
  image_h: 1024
  site_name: Aardvark Labs
  favicon: https://aardvarklabs.blog/wp-content/uploads/2024/04/design-1.png?w=32
  probed_at: "2026-10-07T11:52:02.751Z"
---

# How to Work with JSON in Business Central’s AL Code

[Read the post](https://aardvarklabs.blog/2025/06/06/how-to-work-with-json-in-business-centrals-al-code/) · Aardvark Labs (Marcel Chabot) · 2025-06-06 · 1754 words · tier community · reviewed (checked by Opus)

> Working with JSON in Business Central AL involves understanding JSON structures (values, objects, arrays) and using JsonObject, JsonArray, and JsonToken types to parse incoming JSON data and export records as JSON. This is essential for API integrations, AI systems, and computer-to-computer data exchanges.

## Key points

- JSON is built from values (name and value pairs), objects (containers of values and arrays) and arrays (lists of objects or values)
- Parse incoming text with JsonObject.ReadFrom and read fields with GetText, GetInteger and GetArray
- Iterate arrays with foreach over JsonToken, converting each token to a JsonObject
- Export records by building JsonObject and JsonArray structures, then WriteTo text and download via a Temp Blob stream
- The author notes REST APIs with JSON are simpler and leaner than SOAP APIs with XML

## Quotes

- "REST APIs use JSON and are generally simpler, human readable, and leaner." (Explains why JSON is the standard for modern API communication in Business Central)
- "Working with JSON data is critically important as we progress into more complex AI and data integration systems." (Highlights the strategic importance of JSON skills for developers building AI and integration solutions)

## AL objects mentioned

As named in the post. A name that matches one object page by exact type and name links to it; the others stay as named.

- other "JsonObject"
- other "JsonArray"
- other "JsonToken"
- other "Temp Blob"
- other "TextBuilder"

## Context

- Features: JSON parsing, JSON export, File upload and download, REST API integration, Record serialization, Array iteration

Source: Aardvark Labs, community blog. Summary, key points and quotes are derived (CONTENT-NOTICE.md); read the original for the full text.
