Hello everyone,
JSON (JavaScript Object Notation) is a lightweight data-interchange format. It is easy for humans to read and write.
JSON (JavaScript Object Notation) is a lightweight data-interchange format. It is easy for humans to read and write.
Hello everyone,
I am trying to write a REST consumer the API that I am talking to expects a file to be sent over and in response I will get a file back if anyone out there has ever had a similar use case please could you kindly guide us or share some sample code please
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.
Hi:
I'm looking for some help with JSON notation for a global structure. I need a way to represent a global structure in JSON where the global structure both has a value at a given node as well as sub-nodes.
Hi:
I've looked on many of these examples and questions how to post the JSON body but all the posts are a little complexly worded for me to follow.
so i have an EnsLib.REST.Operation
The example in ENSDEMO Directory Request says
Set tSC=..Adapter.PostURL(tURL,.tHttpResponse,"",pRequest.Body)
What i can't see is how in Demo Rest Directory request it happens to get the value of the message fields into
/// For JSON content submission
Property Body As %GlobalCharacterStream;
I have also played around with converting objects to JSON ect. All i want to do is post an example like this to the API
Hi All
It's been 6 weeks since my original article ![]()
- - - - -but I have been busy on this project ![]()
I have been looking at/thinking about a replacement for ZEN for around 12 months but only really started in depth 4 months ago.
Also been in IT for long enough that I can "get a feel" for a product/technology and make decisions accordingly without going into great detail.
Any new technology has a learning curve and I don't want to waste time and effort on something that won't fly.
And, as always, I am looking to minimise the learning curve as I want to concentrate on delivering business benefit.
Has anyone used the ##class(HS.JSON.Path).%Evaluate() classmethod interrogate JSON and return a specific object value? I need to extract the MessageHeader.destination.endpoint value from a FHIR bundle and can't seem to get that XPath-like method to work.
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
Hello,
I am trying to use %ZEN.proxyObject to send out in JSON format so I do:
and I get:
{
"aboolean":"true",
"notanumber":28001
}
But I want this:
{
"aboolean":true,
"notanumber":"28001"
}
Help please !
Hi folks!
Do we have an embedded REST API in IRIS which accepts arbitrary SQL and returns data in JSON?
Or if anyone did something like this?
The idea is to have something like MDX2JSON but SQL2JSON.
Thanks!
Hello,
We are working with a vendor who only accepts JSON as payload. We are currently still on Cache/HealthShare, not IRIS. Since we have to send Continuity of Care Documents, this raises issues with Long Strings (some CCDs can be quite large and in addition to that, they have to be b64-encoded which increases their size even more).
My question is: if we were to go on IRIS and use %JSON.Adapter, storing the encoded Stream in an object's Stream property, would calling %JSONExport() on this object produce the desired JSON? Or would we have to call %JSONExportToStream()?
Hey Intersystems Community-Member,
Following Issue: When I update a SQL table like (update OnlineV3Admin.ParameterApp set popuptext = '' where ID = '1') and then read it for my Json WebService there is a /"x00" in my Json.
What is the best option to disable that? I need here a empty String and not /x00.
Any ideas?
Best regards,
Florian Hansmann
What is the best way to create an HL7 message from JSON input file?
We have JSON file available with data required for building the HL7 message . I am trying to use a standard file/FTP Business service to pick up the file and convert the input %FileCharacterStream into a dynamic Object and use the stand JSON features to read /process the data and build the HL7 message.
Is there any other better way to do this? or any standard built-in functionality available in HealthShare?
Thanks you for your help
Mary
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!
Hello!
How to set null in variable?
I need to create JSON like below:
{
"id":"1",
"Code": null
}
1. Define Persistent ClassCall utility class to fetch json via query.Class Test.JSONFromSQL Extends (%Persistent, %Populate){Property FirstName As %String(POPSPEC = "FirstName()");Property LastName As %String(POPSPEC = "LastName()");Property CountOfThings As %Integer(POPSPEC = "Integer()");ClassMethod OutputJSON() As %Status{If '..%ExistsId(1) Do ..Populate(100)Set sql="select FirstName, LastName, CountOfThings from Atmus_Web_Test.JSONFromSQL"Quit ##class(JSON.FromSQL).OutputJsonFromSQL(sql)}2. Utility ClassClass JSON.FromSQL Extends JSON.Base{ClassMethod OutputJsonFromSQL(sql,%parm...) As

“A Dry Martini”, he said. “One. In a deep champagne goblet.”
“Oui, monsieur.”
“Just a moment. Three measures of Gordons, one of vodka, half a measure of Kina Lillet. Shake it very well until it’s ice-cold, then add a large thin slice of lemon peel. Got it?”
"Certainly, monsieur." The barman seemed pleased with the idea.
Casino Royale, Ian Fleming, 1953
OAuth helps to separate services with user credentials from “working” databases, both physically and geographically. It thereby strengthens the protection of identification data and, if necessary, helps you comply with the requirements of countries' data protection laws.
With OAuth, you can provide the user with the ability to work safely from multiple devices at once, while "exposing" personal data to various services and applications as little as possible. You can also avoid taking on "excess" data about users of your services (i.e. you can process data in a depersonalized form).
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.
$LIST string format and %DynamicArray and %DynamicObject classes
IRIS, and previously Cache, contain several different ways to create a sequence containing a mixture of data values. A data sequence that has been available for many years is the $LIST string. Another more recent data sequence is the %DynamicArray class, which along with the %DynamicObject class, is part of the IRIS support for JSON string representation. These two sequences involve very different tradeoffs.
$LIST String Format
Hi guys!!
Anyone of you, someday needed to convert a parsed XML (With %XML.TextReader), to a DynamicObject on caché? If anyone can help me, I'm grateful.
Hi all,
I need some advice about JSON conversions and the outputs. I am being sent a JSON response from an API call and I am struggling to produce an output that I can use from it.
I have used the %FromJSON() method call to take the JSON stream source (pData) and convert it to a Dynamic object (object) but I am a little unsure as to how I can read the dynamic object and use it to extract the values from this and set the values as a property in another class.
The current coding I have for the conversion:
set object = ##class(%DynamicAbstractObject).%FromJSON(pData)
$$$TRACE("object:"_object)
Hey Developers,
New demo show by InterSystems Manager @Amir Samary is already on InterSystems Developers YouTube:
⏯ InterSystems IRIS: Kafka, Schema Normalization and Service Enablement
Hi Developers,
The new video from Global Summit 2019 is available on InterSystems Developers YouTube:
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:
This is a sample to use %JSON.Adaptor class available in IRIS to produce a snapshot of your object.
The sample consists of 2 classes that are variations of what was known in Caché/SAMPLES as Sample.Person.
Be aware that the possibilities are limited by %JSON.Adapter and how you make use of it.
Once in place, you create some test data by Populate().
You select an object and take a snapshot.
You apply changes to your object and take another snapshot.
And see the difference.
BINGO!
It's also an example of a customized SystemFunction extension (ZZISJSON) in Caché & IRIS
This time it is to be included in %ZLANGF00.mac
A JSON string is mostly imported from a file or over REST
You rely on a clean and compatible structure. This is the check.
required: ZPretty.mac
demo
t's also an example for a customized command extension (ZZJSN) in Caché & IRIS
This is the Caché version for fast JSON formatting but it also works in IRIS.
Requires package ZPretty
To allow parallel existence in IRIS this is named ZZJSN
see:
t's also an example for a customized command extension (ZZJSON) in IRIS
IRIS has a nice %JSON.Formatter class.
But for debugging it is not really handy.
see:
ZWRITE js1
js1="{""Name"":""Cunningham,John C."",""SSN"":""294-11-9150"",""DOB"":""1933-01-08"",""Home"":{""Street"":""4249 Ash Street"",""City"":""Tampa"",""State"":""MD"",""Zip"":""30176""},""FavoriteColors"":\[""White"",""Red"",""Green""]}"
so you proceed for the most simple case
Hi everyone,
when I'm using the %JSONExport-function on Caché-Objects containing properties of type %integer, %numeric or %boolean, this properties are all automatically converted to Strings in the JSON-Output.
Is there a way to get around this type-cast?
Example:
Result with %JSONExport:
maxOrderable and maxReserveable are of type %integer, deliverable and assembly of type %boolean. All 4 properties are shown as quoted Strings.
Result with ##class(%ZEN.Auxiliary.jsonProvider).%ObjectToJSON (same class+properties):
Thanks!
Thomas
I was trying the %JSON.Adapter backport to cache and try it also in IRIS and i found a kind of an issue regarding to export and object to json that is an inheritance of %ListOfObjects
If we have a list of elementtype of and object and then we try to export this to a json we get this json instead of a correct json.
exported json:
{
"ElementType":"test.element",
"Size":"1"
}
Json that we want:
[
{
"field1":"testField1",
"field2":"testField2"
}
]
Test classes: