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

Hello Intersystems-Community,

I build an API and there I use $order to get the Data from my Globals.
When I first time use that API it's get an error (504 Gateway-Timout > 60 Sec.).

After 2 reloads it works with a loading time of 2 Sec.! Sounds for me like the $order is cached and it works faster. Is it true $order will be cached?

When it works, I only get the error at the next day. So it's very hard to reproduce that error. Is it possible to delete the cache for $order?

Example:

0 8
0 386

Hey Intersystems Community,

I have a Problem with the Session Handling in .csp.

I wrote all my Web Services in .csp-Pages and do the work for example in the OnPreHttp Method for to get some data.

After that the Web Service response is in JSON.

I call These Web Services via fetch in my react Single Page application, also Many request parallel. The react App is Rolled out as index.html.
Everything Works Fine with the session Handling via Cookie.

0 3
0 379
Question
· Mar 7, 2019
JSON challenge

Hello folks,

I have an JSON object that need to be updated before being parsed into a JSX component.

Source JSON obj:

var Obj = { "data": [
  {"id":1, "text":"Task #1", "project":"10", "sub_project":"10-1" },
  {"id":2, "text":"Task #2", "project":"10", "sub_project":"10-1" },
  {"id":3, "text":"Task #3", "project":"11", "sub_project":"11-1" },
]};

Required JSON obj result:

0 1
0 373
Question
· Jan 18, 2022
FHIR Bulk Data and ndjson

Hi all,

I am testing asynchronous Bulk Data retrieve with a large EHR vendor. When I retrieve the bulk data, they are returning ndjson (CONTENT-TYPE of "application/fhir+ndjson; charset=utf-8"). If I attempt to process that content using JSON functions - I get

ERROR #5035: General exception Name 'Parsing error' Code '3' Data ''

For example, the following generates the error

s objArray={}.%FromJSON(quickStreamOut)

The error makes sense in that ndjson is not a valid json format (I assume at least).

0 1
0 372

In this article we are going to see how we can use the WhatsApp instant messaging service from InterSystems IRIS to send messages to different recipients. To do this we must create and configure an account in Meta and configure a Business Operation to send the messages we want.

Let's look at each of these steps in more detail.

Setting up an account on Meta

This is possibly the most complicated point of the entire configuration, since we will have to configure a series of accounts until we can have the messaging functionality.

14 0
4 363

Hi everyone, I have and Zen Mojo application, it's all working but I have some doubts about what is recommended to use: There is some reports of employees, for example, and actually I'm using some plugins : "Excelent export" to generate Excel reports and "jspdf" to generate PDF reports in client side.

I have an REST service, that receives the request, process and returns JSON, after client side receive the response it's processed.

- This can be slow/bad in applications with large data?

- It's better/recommended to use ZenReports even with ZenMojo applications?

1 2
0 359
Announcement
· May 5, 2020
ObjectScript Json Patch

objectscript-json-patch

alt text

An implementation of JSON-Patch in ObjectScript.

Why you should use JSON-Patch

JSON-Patch (RFC6902) is a standard format that allows you to update a JSON document by sending the changes rather than the whole document.
JSON Patch plays well with the HTTP PATCH verb (method) and REST style programming.

Install

With zpm :

5 2
1 357
Article
· Mar 7, 2023 10m read
Reference for the JSON Web Classes

Foreword

InterSystems IRIS versions 2022.2 and newer feature a redesigned functionality for JSON web tokens (JWTs). Once housed under the %OAuth2 class package, the JWT class, along with other JSON web classes (JWCs), now live under %Net.JSON. This migration occured in order to modularize the JWCs. Before, they were closely intertwined with the implementation for the OAuth 2.0 framework. Now, they can be maintained and used separately from OAuth2.

2 0
0 356

Hi Community,

I have json equivalent persistent object in pjsonObj variable. Final JSON example below.

{
"Document": {
"FileExtension": "pdf",
"FileContent": "JVBERi0xLjUNCiW1tbW1DQo...(very large bsae64 string)"
}
}

Here FileContent field in json will contain converted base64 string of very large pdf(10pages). I need to submit this json as a payload to REST endpoint.

below code is working fine.

2 1
0 353

Hello fellow community members,

I would like to offer my services as an Intersystems Professional and am available to work on projects.

I have more than a decade experience into Intersystems stack of technologies including IRIS, Ensemble, Healthshare, Healthconnect, Cache Objectscript, Mumps, Zen, Analytics etc. with companies spread over US and UK involved in multiple domains.

1 0
0 352

Dear Colleagues and Friends,

is there any indication that the .NET object representation of Cache objects (i.e. InterSystems.Data.CacheClient.dll) complies with .NET Standard? I'm planning to extend our existing .NET client/server solution with a mobile option by Xamarin Forms and can't find any significant hints in the internet.

I'm just fooling around a bit and made some expreiments with a REST API and a generic object-to-JSON tier:

0 1
0 350

Still working on my first External REST API call, and I am struggling to find the exact answer I am looking for... I get a JSON response from my API call but I am not quite sure how to dynamically get the JSON response into the Ens.Response Object with its lists of Arrays that I have defined.

set tSC = ..Adapter.SendFormDataArray(.tHTTPResposne,"POST",tHTTPRequest,,,tURL)

0 10
0 345

I had a challenge recently where I was asked to parse and iterate JSON to find a patient that has a forename = "Bill" and try to make the function that iterates through the code re-usable.

Being working in Healthcare there isn't much experience or demand for parsing JSON, as most of my work is HL7.

I took this on using the documentation and worked out a way to parse the JSON (see posts below for code and source data).

0 6
0 333

There are couple of options to do this.

1. You can extend your class &JSON.Adaptor, it will do it for you with inbuilt logicaldtodisplay methods

2. Create another request class and do your transformations

3. Before calling the json convert to stream methods, transform the object's field with a ZDT.

---------------------------------------------------------------------------------------------------------------------------------------

I have an extremely simple example where there is a class with 3 properties

0 1
0 331
Article
· Feb 7, 2022 1m read
GlobalToJSON-embeddedPython

I have created a package to export a Global into JSON object file and to re-create it by reloading from this file
embeddedPython refers to the new available technologies. It should be understood as a learning exercise of
how to handle the language interfaces. Only Global nodes containing data are presented in the generated JSON file.

1 2
0 330