9 Followers · 445 Posts

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

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.

0
0 22
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
5
0 51
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

}
20
0 180
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.

5
0 56
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 85
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

0
0 16