9 Followers · 447 Posts

JSON (JavaScript Object Notation) is a lightweight data-interchange format. It is easy for humans to read and write.

New
Article David Hockenbroch · 21 hr ago 2m read

Inspired by @Ashok Kumar T's post on the ideas portal here as well as my own wishes for a solution to this problem, I have come up with a simple way to allow more complete and consistent JSON queries without having to specify every desired field. I have created a class that extends the built-in %JSON.Adaptor class and makes its %JSONExportToString and %JSONExportToStream methods accessible through SQL with just a couple of simple SqlProc Methods.

Class DH.JSONAdaptor Extends %JSON.Adaptor [ Abstract ]
{
ClassMethod jsonstring(id, map = "") [ SqlProc ]
{
	try{
		set myobj = ..%OpenId(id)
3
0 50
New
Article Oliver Wilms · 13 hr ago 2m read

iris-budget

I created iris-budget app for the InterSystems Full Stack Contest in 2026. By full stack, we mean a frontend web or mobile application that inserts, updates, or deletes data in InterSystems IRIS via REST API, Native API, ODBC/JDBC, or Embedded Python.

My app uses multiple REST APIs to add a new category or retrieve a list of categories of expenses and income.

First web application /csp/coffee

I inherited /csp/coffee from module.xml in iris-fullstack-template.

Second web application /csp/budget

For this project, I created a swagger file called "budget.json." I wanted to use the spec

0
0 27
Article Marco Bahamondes · Jun 24, 2025 3m read

Introduction

InterSystems IRIS allows you to build REST APIs using ObjectScript classes and the %CSP.REST framework. This enables the development of modern services to expose data for web apps, mobile apps, or system integrations.

In this article, you'll learn how to create a basic REST API in InterSystems IRIS, including:

  • A persistent data class
  • A REST class with GET and POST methods
  • A web application to expose the API
  • A full demonstration using Docker

4
3 320
Article Evgeny Shvarov · May 9, 2025 3m read

Hi developers!

Observing the avalanche of AI-driven and vibe-coding developer tools that have been appearing lately almost every month with more and more exciting dev features, I was puzzled whether it is possible to leverage it with InterSystems IRIS. At least to build a frontend. And the answer - yes! At least with the approach I followed.

Here is my recipe to prompt the UI vs InterSystems IRIS Backend:

  1. Have the REST API on the IRIS side, which reflects some Open API (swagger) spec.
  2. Generate the UI with any vibe-coding tool (e.g., Lovable) and point the UI to the REST API endpoint.
  3. Profit!

Here is the result of my own exercise - a 100% prompted UI vs IRIS REST API that allows to list, create, update delete entries of a persistent class (Open Exchange,frontend source, video):

What is the recipe in detail?

7
2 361
New
Article David Hockenbroch · Feb 18 7m read

In the previous article, we examined how we can use the %CSP.Request and %CSP.Response classes to test a REST API without having the API fully set up and accessible across a network with an authentication mechanism. In this article, we will build on that foundation to perform some simple unit testing of one of our REST API methods.

The unit testing framework requires a couple of setup steps before we can use it.First, we have to ensure that the unit testing portion of the management portal is enabled so we can review the results of our tests.

0
1 94
New
Question Yann Simons · Feb 16

Hi,

I'm having a problem with %JSON.Adaptor and "list of" binding.

For exemple, this class with a property "oazisCode As list of %String".

Class User.ADGroup Extends (%Persistent, %JSON.Adaptor)

{
/// Code interne
Property code As %String;

/// Libellé
Property text As %String(MAXLEN = "");

Property oazisCode As list Of %String;

}

The first time call to %JSONImport works properly

s r = ##class(User.ADGroup).%New()
s json = {"code": "123", "text":"456", "oazisCode": ["1","2"]}
d r.%JSONImport(json)
w r.oazisCode.Size
2

If I call %JSONIMport a second time with another json , the

5
0 61
Question Evgeny Shvarov · Feb 5

Hi developers!

In a method I need to return a result as a dynamic object aka JSON Object. And here is my logic:

Classmethod Planets() as%DynamicObject {

 set val1="Jupiter"
 set val2="Mars"// this doesn't work! cannot compile
 return {"value1":val1, "value2":val2}

}

So I need to do the following:

Classmethod Planets() as%DynamicObject {

 set val1="Jupiter"
 set val2="Mars"
 set result={}

 set result.value1=val1

 set result.value2=val2

 return result

}

The second case works.Maybe I'm preparing the Dynamic Object in the wrong way?Can we just use variables inside JSON?

20
0 184
Question Scott Roth · Feb 5

I have always struggled with Iterating through a JSON response to pull out certain fields into a Data Class Structure to use to populate fields in a DTL. So I defined the whole structure for the following JSON, with the base structure extending Ens.Response, %XML.Adaptor, and %JSON.Adaptor.

{
    "status": {
        "message": "success",
        "code": 200
    },
    "data": {
        "client": "xxxxxxxxxxxxxxxxxxxxxxxx",
        "entities": [
            {
                "id": "xxxxxxxxxxxxxxxxxx`",
                "name": "xxxxxxxxxxxxxxxxx",
                "totalCommentCount": 
5
0 57
Article Luis Angel Pérez Ramos · Jan 28 5m read

How many times have you had to receive or generate a JSON and wished you could work on it using DTLs without having to deal with DynamicObjects trying to remember the name of each field? Do you want to break down and make your giant JSON file more digestible?

In my case, never, but I thought that someone might find it useful to have a feature that captures your JSON and breaks it down into a series of ObjectScript classes that you can work with more easily and conveniently.

Well then...behold JSON2Class in all its glory!

0
0 92
Article Thomas Dyar · Jan 25 14m read

TL;DR: This article demonstrates how to run GraphRAG-style hybrid retrieval—combining vector similarity, graph traversal, and full-text search—entirely within InterSystems IRIS using the iris-vector-graph package. We use a fraud detection scenario to show how graph patterns reveal what vector search alone would miss.


Why Fraud Detection Needs Graphs

Every year, businesses and consumers lose billions to fraud.In 2024 alone, consumers reported $12.5 billion lost—a 25% increase year over year.What makes modern fraud so difficult to detect is that fraudsters rarely work alone.

0
0 17
Article Tani Frankel · Jan 22 9m read

This is the second part of an article pair where I walk you through:

  • Part I - Intro and Quick Tour (the previous article)
    • What is it?
    • Spinning up an InterSystems IRIS Cloud Document deployment
    • Taking a quick tour of the service via the service UI
  • Part II - Sample (Dockerized) Java App (this article)
    • Grabbing the connection details and TLS certificate
    • Reviewing a simple Java sample that creates a collection, inserts documents, and queries them
    • Setting up and running the Java (Dockerized) end‑to‑end sample

As mentioned the goal is to give you a smooth “first run” experience.

0
0 15
Article Tani Frankel · Jan 22 5m read

If you already know Java (or .Net) and perhaps also have used other document databases (or looking for one), but you are new to the InterSystems world, this post should help you.

InterSystems IRIS Cloud Document is a fully managed document database that lets you store JSON documents and query them with familiar SQL syntax, delivered as a cloud service managed by InterSystems.

In this article pair I’ll walk you through:

  • Part I - Intro and Quick Tour (this article)
    • What is it?
    • Spinning up an InterSystems IRIS Cloud Document deployment
    • Taking a quick tour of the service via the service UI
  • Part II - Sample (Dockerized) Java App (the next article)
    • Grabbing the connection details and TLS certificate
    • Reviewing a simple Java sample that creates a collection, inserts documents, and queries them
    • Setting up and running the Java (Dockerized) end‑to‑end sample

The goal is to give you a smooth “first run” experience.

0
0 18
Question Evgeny Shvarov · Jan 18

Hi folks!

How can we handle JSON boolean types in IRIS?

I'm having a UI sending me a JSON payload as:

{

  "id": 1,
  "strprop": "string",
  "boolprop": true

}

The class is 

MyPackage.MyClass Extends (%Persistent%JSON.Adaptor)

{

strprop as%String;

boolprop as%Boolean;

}

And I'm trying to update an instance of a MyPackage.MyClass and I'm getting a datatype-related error, something like %JSONImportInternal+269...

How am I supposed to deal with booleans in JSON with IRIS and ObjectScript? Any best practice advices?

5
0 96
Article Ashok Kumar T · Feb 17, 2025 6m read

What is JWT?

JWT (JSON Web Token) is an open standard (RFC 7519) that offers a lightweight, compact, and self-contained method for securely transmitting information between two parties. It is commonly used in web applications for authentication, authorization, and information exchange.

A JWT is typically composed of three parts:

1. JOSE (JSON Object Signing and Encryption) Header
2. Payload
3. Signature

These parts are encoded in Base64Url format and concatenated with dots (.) separating them.

Structure of a JWT

Header

{ "alg": "HS256", "typ": "JWT"}

Payload

{"sub": "1234567890", "name": "John Doe", "i
4
9 633
Question Scott Roth · Jul 14, 2025

I have been struggling sometime with trying to take a FHIR Bundle Response, extract the "entry.resourceType", extract the MRN and Name from the Patient FHIR Response...

Going through learning.intersystems.com, it suggested that I try using fhirPathAPI to parse and search my response for certain values, however I am not sure my syntax is correct. Using the AI code, it suggested to set my tree = "Bundle.entry.resource.resourceType"

ClassMethod Transform(source As HS.FHIRServer.Interop.Response, target As osuwmc.Epic.FHIR.DataStructures.PatientSearch.Record) As%Status
{
  Set tSC=$$$OKset tQ
1
0 121
Question Scott Roth · Dec 26, 2025

As I am iterating through the FHIR JSON Response from a Patient Search, I am running into an issue where the extracted values are not being popualted into the Response object that I have created. If I do a $$$LOGINFO on them they will show up in the Object log, however if I try the following for example I get an error.

set target.MRN = identifier.value

ERROR <Ens>ErrException: <INVALID OREF>Transform+15 ^osuwmc.Epic.FHIR.DTL.FHIRResponseToPatient.1 -- logged as '-'
number - @'
set target.MRN = identifier.value
'

Here is my Ens.DataTransform

Class osuwmc.Epic.FHIR.DTL.FHIRRespo
3
0 81
Article David Hockenbroch · Nov 3, 2025 8m read

When I was younger (a question about exactly how much younger is outside the scope of this article), the word “token” meant fun. You see, just a couple of times a year, I would get to go to an arcade and play some amusing video games with my friends.

These days, tokens signify security.JSON Web Token (JWT) Authentication has become one of the most popular standards for securing REST APIs.Fortunately for IRIS users, we have a straightforward way to set up applications to be protected this way.Yet, the idea is still similar to my old arcade days.

3
11 330
Question Timothy Leavitt · Aug 26, 2025

What are best practices for JSON transformation in IRIS interoperability? This is for a non-healthcare use case, so any tools we happen to have around FHIR might not be available. The motivating use case is trimming down a verbose and needlessly complex REST API response to feed to an LLM - trying to reduce token usage and maybe get better results from less noisy data.

Specifically, I'm imagining matching based on JSONPath expressions and simplifying structures based on the inferred type of elements rather than a full schema.

10
0 212
Article Ashok Kumar T · Nov 10, 2025 2m read

FastJsonSchema: High-Performance JSON Validation in IRIS

Validating JSON data against JSON Schema is a common requirement for modern applications. FastJsonSchema brings this capability natively to InterSystems IRIS, combining speed, simplicity, and full schema compliance.

Unlike traditional validation approaches, FastJsonSchema generates native ObjectScript code from your JSON Schemas and compiles it directly to iris object code, enabling idiomatic performance without relying on external libraries or runtimes.

1
0 88
Question Yuriy Borokhov · Apr 1, 2017

Hello,

Are there any utilities/api in HealthConnect 2016.2.1 that will allow conversion of XML virtual document to Json format? We were thinking to convert HL7 ADT message to XML via Ensemble DTL and then send it to another BP to convert to Json format for transmission via Web Services. To my understanding there isn't anyway to represent Json as a virtual object so it can be use for direct mapping of HL7 2.x message to Json via Ensemble DTL.

Thanks

Yuriy

6
0 2989
Article Vachan C Rannore · Nov 21, 2025 3m read

Hola amigo! 😊 Cómo estás hoy,

I would like to share a small part of my learnings from my first ever official project: POS/EDC machine integration with our billing system. This was an exciting challenge where I got hands-on experience working with APIs and vendors. 

How does a Payment Machine actually work?

It's simple, start by initiating/creating a transaction, then retrieve its payment status.

Here, initiate/create refers to POST method and Retrieve refers to GET.

0
2 122
Question Arber Limaj · Nov 19, 2025

Hi everyone,
I'm getting prepared to take the following certification exam: "InterSystems IRIS Development Professional".

Can you give some advice on how to prepare (aside from the official course page: https://www.intersystems.com/certifications/intersystems-iris-development-professional/ )?
Do you have examples of quiz questions that simulate the real exam or any material that helped you getting prepared?

Thanks you in advance,

Arber

1
0 105
Article Alberto Fuentes · Mar 4, 2024 2m read

I would like to share with you a little trick to customize how messages are displayed in the Message Viewer. In particular, how you can display messages as JSON (instead of the default XML representation).

image

Messages are objects that are used to communicate interoperability productions components. In my example I have defined a message that later I serialize as JSON to send to an external API. This message is defined as a regular message and also as a %JSON.Adaptor so I can export / import directly to or from JSON.

Class interop.msg.DeviceOrderReq Extends (Ens.Request, %JSON.Adaptor)
{

Parameter
3
6 634
Article Ashok Kumar T · Oct 20, 2025 11m read

What is XML?

XML(eXtensible Markup Language) is a flexible, text-based, andplatform-independentformat used to store and transport data in a well-structured way that is both human- and machine-readable. XML permits users to define custom tags to describe the meaning and organization of their data. For example: <book><title>The Hitchhiker's Guide</title></book>.

An XML document is self-descriptive and structured as a hierarchical tree of elements.Every document has a single root element that encapsulates all other content.

3
6 344
Article Pravin Barton · May 1, 2020 1m read

ObjectScript doesn't include any built-in method for appending one JSON dynamic array to another. Here's a code snippet I use that's equivalent to the JavaScript concat() method.

Call it with any number of arguments to concatenate them into a new array. If an argument is a dynamic array, its elements will be added. Otherwise the argument itself will be added.

			while iter.
6
4 1012
Article Theo Stolker · Feb 17, 2025 2m read

For one of our customers I had to integrate with the AFAS imageconnector endpoint /imageconnector/{imageId}?format={format}. This endpoint returns in a json message with the image as a base64-encoded string property, in addition to the mimetype for the image:

/// Image Object
Class Mycustomer.Model.AfasGet.Image Extends (%SerialObject, %XML.Adaptor, %JSON.Adaptor)
{
/// file data (base64 encoded)
Property Filedata As %String(%JSONFIELDNAME = "filedata");

/// MimeType e.g. "image/jpeg"
Property MimeType As %String(%JSONFIELDNAME = "mimetype");
}

In the Message class, we tried handling this

3
1 331
Article Ashok Kumar T · Nov 4, 2025 3m read

Introducing IRIS DocDB Explorer: A Sleek UI for Managing JSON Documents in InterSystems IRIS

IRIS offers a dedicated feature for storing and retrieving JSON documents using DocDB, without requiring a predefined schema.

Developers often need a quick and intuitive way  to browse, create, and edit documents without switching between multiple tools or writing repetitive code. To solve this, I creatediris-docdb-ui — a CSP-based open-source application that provides a clean, responsive interface for interacting with DocDB effortlessly.

0
0 95
Article Kate Lau · Oct 13, 2025 13m read

Hi all,

Let's do some more work about the testing data generation and export the result by REST API.😁

Here, I would like to reuse the datagen.restservice class which built in the pervious article Writing a REST api service for exporting the generated patient data in .csv

This time, we are planning to generate a FHIR bundle include multiple resources for testing the FHIR repository.

Here is some reference for you, if you want to know mare about FHIR The Concept of FHIR: A Healthcare Data Standard Designed for the Future

OK... Let's start😆

1. Create a new utility class datagen.utli.genfhirjson.cls

6
0 165