The Lo-Code Challenge

Imagine the scene. You are working happily at Widgets Direct, the internet's premier retailer of Widgets and Widget Accessories. Your boss has some devastating news, some customers might not be fully happy with their widgets, and we need a helpdesk application to track these complaints. To makes things interesting, he wants this with a very small code footprint and challenges you to deliver an application in less than 150 lines of code using InterSystems IRIS. Is this even possible?

19 8
6 543

Developing a Full-Stack JavaScript web app with Caché requires you to bring together the right building blocks. Previously, I outlined the basic steps to install and connect Node.js to Caché and make it's powerful multi-model database capabilites available for use with Node.js. You can use Caché as a NoSQL-, document- (with unique key-level access!), SQL- and object-database with Node.js. When developing JavaScript applications, you'll see how powerful this combination is and makes Caché a perfect fit for Node.js.

In the first part of this article series I will show how to get started with the React framework, one of the most popular frameworks currently taking over front-end development. In the next parts you'll learn how to connect a basic web app to a Caché back-end.

You'll see, it's very easy to get started with this technology - you can even compare the amount of basic knowledge you need to COS because you only need to know a few basic concepts to start!

9 8
1 4.7K

You may have heard about our mg-dbx-napi interface for IRIS which provides insanely fast access from Node.js. If you've been following recent developments in the server-side JavaScript world, you'll be excited to know that mg-dbx-napi also works with Bun.js, the latter proving to be significantly faster than Node.js for many/most purposes.

Of course, if you're a Node.js user, you'll probably wonder how mg-dbx-napi compares with the Native API for Node.js that is included with IRIS.

4 8
2 91
Question
· Apr 20, 2018
Special Character API

Hi

Made a request for API REST.

Using HTTP Request adapter.

Adapter As EnsLib.HTTP.OutboundAdapter

Outside the Ensemble an API response is JSON (CORRECT)

Answer in Ensemble: =?Á
Â0
?_eä,cÒ
'=
*^<YÙF¡í$í¼ÈÞÝt
oÉ÷ý$?|
¤1¡{Dâhà°Ý?Öù)2ós??R?¸¼?ºd?$,ñD+»??
?
ÔºQZéýNÕ V{C?óò?b¢?éÍ )$
²5Å?wEë? ??©tÖã1z×2FëÊnôeË æ??]Zßq ܺ?á

Help me.

Thank you

0 8
0 420

Hello everyone,

I created a Class with this 3 properties

Class TestDynamic Extends (%RegisteredObject, %XML.Adaptor)
{

Property number As %xsd.string;

Property exam As %xsd.string;

Property result As list Of %DynamicObject;

}

I'm adding objects to list normally

set objTest=##class(TestDynamic).%New()
set objDynamic={"field":"value"}
do objTest.result.Insert(objDynamic)

But when i use this method to convert to JSON

0 7
0 387

Hi all, I am new to IS Objectscript and I would appreciate some assistance regarding this.

I am trying to find out how to count the number of elements within a dynamic abstract object and I am having some trouble using the size method.

Here is the code below:

The key value pairs are originally in JSON and I would have converted it in to an object for use.

0 7
0 284

Doing a new project with %JSON.Adaptor, unexpectedly realized that %JSON.Adaptor does not support export to native JSON. %JSONExport just outputs directly to the current device, and there are two more methods %JSONExportToString, and %JSONExportToStream.

In conjunction with generating REST from swagger specification, where any generated method accepts as a result %DynamicObject, which is good.

I have multiple places in my REST where I have to return JSON for an object, but I have to modify the result a bit, just extend it with some other way.

1 7
2 747

I am trying to use the automated unittest class for a %CSP.Rest service.

So my Unittest code set's %request and %response from %CSP.Req/resp respectively

I build a tProxy with the fields I need for the post and set it %ToJson... I have tried seting %request.Content = tProxy (and not)

I call the method for the post url directly...

When that method calls %fromJson to set an object with the info. I passed...

- when I don't set %request.content.. I get a error '5035 - premature end of data code 12'

0 7
2 1.1K

Recently, a partner company started to develop an Angular client for their Cache application. Together, we decided to leverage the power of Caché dynamic objects to exchange JSON encoded data between client and server parts. However, we realized that currently there is a gap in Cache JSON implementation that prevents simple use of traditional registered and persistent classes to exposed their data with the same ease as with XML. I wrote a small JSON adapter, that does the job and bridgers the gap. It's purpose is simple expose data described by a regular Cache class in a one-to-one fashion to a %DynamicObject. On the other hand, when a serialized JSON data comes in, it can be easily deserialized into dynamic object and subsequently bound to regular class by the newly created adapter.

13 7
1 2K

Hello,

I am trying to find out if it is possible to decode the Azure access token in IRIS. Has anyone ever tried this before? I need to decode the token to extract the "Scope" details in order to verify the scope to make sure client is permitted to do the request they have done.

If you could point me to any information, that'd be great.

Thank you.

Utsavi

0 7
0 586

Hey Community,

my Caché Version is 2013.1 and I can't update now.

I want to serialize a SQL Answer row into an Array filled with objects and then convert it to json.

Actually I use the following, which is very error prone when I have to do that often:

0 7
0 642

I have defined a class with a dynamic object property:

My class

The issue I encounter is that if a length of a serialized json property is more than 3641144 symbols, the object fails to save with the following error (either MAXSTRING or STRINGSTACK):

Length: 100 Result: OK
Length: 3641143 Result: OK
Length: 3641144 Result: OK
Length: 3641145 Result: ERROR #5002: ObjectScript error: <MAXSTRING>%GetSerial+1^%Library.DynamicAbstractObject.1
Length: 7282288 Result: ERROR #5002: ObjectScript error: <STRINGSTACK>%GetSerial+1^%Library.DynamicAbstractObject.1

Is there a workaround? I need to store moderately large jsons (10-15 Mb) and dynamic object properties allow for a very convenient access.

$ZSTORAGE is set to -1.

2 6
0 769
Question
· Dec 19, 2016
HL7 Section to JSON

Hi all,

I'm trying to convert a HL7 section to a XML or JSON string.

We need to save the content of PID section into a SQL Column, therefore we need to convert it into a XML o JSON string

is there any easy way to convert it?

I've tried to convert it directly into a DTL, but all my attempts have been unsuccessful

Best regards,

Francisco Lopez

1 6
0 1.3K

Okay, we've got a quite useful way to very easily Import and export our objects as JSON, similar to what we already had before for XML.

So, It's a %JSON.Adaptor. But the issue here I faced with, working with Stream properties.

I have an example, when I generate an object, with stream binary stream properties. Export and Import the same, but getting the different resulting objects, depends on the original size of streams.

0 6
1 1.2K
Question
· Aug 22, 2016
$fromJSON and MAXSTRING

Hi, all.
I have CSP application and it needs to get and process data from ajax request with json-content. JSON can be very big.
In this case:
TRY
{
Set RequestObj = ##class(%Object).$fromJSON(%request.Content.Read())
} CATCH(Exception) {
Set Status=Exception.AsStatus()
}
I get just part of getting JSON and validate error in $fromJSON.
If I try to read it all in cycle:
TRY
{
While (%request.Content.AtEnd = 0) {

0 6
0 1.4K

Hi folks!

Examining FHIR profile validation with InterSystems FHIR server. FHIR profiles is a very useful feature of FHIR standard that helps an organization or solution to establish constraints to a very disperse FHIR standards that are relevant to a particular business solution. Learn more on FHIR profiles.

I created a very simple FHIR profile with the following JSON:

0 6
0 390

Hello everyone!
I have to build a REST service that receives a POST HTTP-request, collect a file from that request in the Form data and then send it in another HTTP Post request through Form Data. However I can't really seem to send the file, and I do not know where it has gone wrong. All I am getting told is that no file is being received from my HTTP Post request. I am reaching the REST Service I am supposed to send the request to, but nothing is being sent.

0 6
0 283