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.
I know what you are thinking... a new feature for ZEN.proxyObject...? NOW..???
In Spain we say that better late than never ;-)
Have you ever need to send a numeric attribue of a Json in String format?
Did you go crazy casting class objects with fixed typed properties?
Lucky you!!
With this new feature I propose a way to continue working with our loved dynamic object %ZEN.proxyObject, being able to choose whether or not we want to send numeric attributes in String format.
I'm revisiting some older projects that can benefit from the new JSON support and dynamic object capabilities in 2016.1 FT / 2016.2 FT. (Particularly, some of the really new features in the latest 2016.2 FT.)
For the particular thing I'm working on, it would be very handy to be able to merge objects, similarly to https://api.jquery.com/jquery.extend/. The closest thing I've found so far (in 2016.2 only) is:
Set o1 = {"a":1,"c":2}, o2 = {"b":1,"c":1}
Write "o1: ",o1.$toJSON(),!
Methods written in ObjectScript can use pass-by-reference arguments to return information to the caller. Python doesn’t support pass-by-reference arguments, so Embedded Python in IRIS doesn’t support them either. That's it, that's the end of the post, hope you liked it. 😉 But wait, what about the Classic Rock & Roll?
I have created a FHIR endpoint and send the FHIR resource to FHIR Interoperability production class which is HS.FHIRServer.Interop.Service through the the created endpoint(/r4). I can able to see/get the HS.SDA3.QuickStream(It use CacheTemp.HS.Stream temporary global) on the fly(In between the process). I'm unable to get the FHIR resource from the QuickStream once the process completed. Is this HS.SDA3.QuickStream is wiped out from the system once process completed?
I have a Cache classes with %TimeStamp (e.g. 2016-04-18 12:29:11) and %Date (eg. 64027) properties. And I have a javascript client app, which needs full CRUD over this properties.
But in javascript date/time are defined by ISO8601 (e.g. timestamp 2016-04-18T12:29:11Z, date 2016-04-18).
We're creating a series of RESTful APIs that output data from a Cache database (made up of global storage that we've mapped to classes). I'm running into some problems with object-to-JSON conversions when relationships are involved. Eg:
ParentClass has children relationship to ChildClass
The similarity between JSON objects + arrays and Globals in IRIS or Caché is evident. With small and medium size JSON objects navigation across %Dynamic Objects is comfortable. But with large and/or deep cascaded objects it becomes a challenge.
The presented tool offers 3 variants
loading an already existing %Dyamic object or Array into a global of your choice
loading a %Stream containing a JSON object into a global of your choice
loading an external File containing a JSON object into a global of your choice
Hi all, I am trying to compile my swagger class file with swagger JSON which is a valid JSON as I created it and verified from swagger.io 2.0 spec. But getting below error. I am not very clear with the error message. Please help me resolve the same.
ObjectScript error: <CLASS DOES NOT EXIST>removeprj+7^%occClass *SwaggerClass
> ERROR #5091: An error has occurred while removing projection SwaggerClass:Reference.
> ERROR #5030: An error occurred while compiling class 'SwaggerClass'
or "So you just got yelled at by your boss, for sending him an unformatted Hello World webpage"
Our previous lesson ended with us serving a Message value obtained from a Caché REST service to the client, using Angular as a runtime. While there is a lot of moving parts involved in this process, the page is not especially exciting at the moment. Before we can start adding new features, we should take a step back and review our tools.
I want to do something like the above sample from a Google Storage JSON API. I have a call to Write obj.%ToJSON() followed by return ..ReportHttpStatusCode(..#HTTP404NOTFOUND) however the HTTP Status code is always 200. If I remove the Write obj.%ToJSON() statement it returns a 404 status with no body. How do I return both?
This package offers a utility to export an XLarge Global into a JSON object file and to show or import it again. In a previous example, this all was processed in memory. But if this is a large Global you may either experience <MAXSTRING> or an <STORE> error if the generated JSON structure exceeds available memory.
The power of the presented tool becomes visible with a large JSON file. The example I have prepared is composed of the daily results of AoC 2023. Anonymization makes it usable for demo purposes.
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).
JSON is a lightweight data interchange formatfor representing and exchanging data between a server and a web application. Its popularity has led to its widespread use in applications based on InterSystems technology, as well as demand for a converter that transforms globals to JSON and back. Therefore, @Evgeny Shvarov suggested developing Global->JSON->Global converter. Implementing such a converter is important to ensure interoperability, simplify data exchange, support web services, and provide a standardized approach to data representation across different software ecosystems. This article, the second in the "Implemented Ideas" series, focuses on several projects created by the legend of InterSystems Developer Community @Robert Cemper that deal with this task: