community postAL Developmentcommunity - not Microsoftreviewed - checked by Opus

Advanced JSON Management for Business Central Developers

Codeunit 5459 JSON Management provides a comprehensive toolset for reading, writing, and converting JSON in Business Central AL code. It simplifies complex data handling by grouping procedures into Read, Write, and Convert categories, with special attention to SaaS-safe operations for cloud deployments.

post Aardvark Labs

Marcel Chabot · 2026-08-21 · 1,359 words · about 6 min

"Codeunit 5459 - JSON Management is one of the most comprehensive helper units in Business Central."

Key points

  • JSON Management holds JSON data within the codeunit variable, eliminating the need to manage separate JSONObject variables
  • Read operations extract values using property names, dot-separated paths, or array indices with flexible return types
  • Write operations build JSON structures by initializing objects/collections and using SetValue, AddArrayValue, or AddJson methods
  • Convert operations transform between JSON and XML formats or format decimals as JSON properties
  • On-Prem-only procedures exist but should be avoided in SaaS environments for cloud compatibility

Quotes

  • “Codeunit 5459 - JSON Management is one of the most comprehensive helper units in Business Central.” (Establishes the scope and importance of the tool for developers working with JSON)
  • “The key thing to know about using this code unit is the persistence of data inside the code unit.” (Highlights the key architectural advantage that distinguishes JSON Management from direct JSONObject usage)
  • “When using Codeunit 5459, remember to configure your AI-assisted development tools carefully. Specify that you want to avoid any procedures flagged as OnPrem.” (Critical guidance for maintaining cloud compatibility in SaaS Business Central environments)

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.

Not found in BC28-30: codeunit “Demo JSON Mgmt”, codeunit “Demo JSON Array Objects”, codeunit “Demo JSON Object Updates”.

Context

  • Features: JSON object reading, JSON object writing, JSON collection handling, XML to JSON conversion, JSON to XML conversion, Property iteration, Nested property access, Array value manipulation

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