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.
I will give you some additional information on my first embedded Python package. it is written as a mix of python and ObjectScript to take the best of both worlds.
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. Differently from the previous example, this one is using embedded Python only, no ObjectScript. Therefore PURE
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.
I have created a package that offers a utility to load a Global into JSON object and reverse to create a Global from this type of JSON object. Compact refers to the structure created. Globals nodes are included with data for a fast data load. But also the related code is quite compact.
I have created a package that offers a utility to load a Global into JSON object and reverse to create a Global from this type of JSON object. Efficient refers to the structure created. Only Globals nodes containing data are presented in the generated JSON object.
I have created a package that offers a utility to load a Global into JSON object and reverse to create a Global from this type of JSON object. Academic refers to the structure created. Each logical node of the Global is presented separately with all its descendants. Even if they don't contain any stored data.
The JSON is a data document free of types and validation rules. However, in some scenarios it is important that the JSON document has type and business rules validation, especially in interoperability scenarios. This article demonstrates how you can leverage a market-defined JSONSchema technology that is open for everyone to use and do advanced validations.
This is a full example how to use a %ScrollableResultSet for results pagination using %DynamicQuery:SQL and build a JSON response including page details.
I thought i would share a little method I knocked together to traverse and compare 2 JSON objects for basic equivilance. I'm currently working on some data migration, and wanted a basic sanity check to validate that the JSON output is basically equivliant between the old and new, excluding a few things like timestamps.
It's a basic little recurvsive method, that will bubble up any differences over a nested structure. It's very low tech, as that's all I need it to do, but I thought it might be useful for others?
QEWD is assumed by most people to only integrate with IRIS (or Cache) via a connection through IRIS's high-performance C interface. This requires QEWD (and its Node.js environment) to be installed and configured on the same machine as IRIS.
I'm frequently asked if QEWD can run on a separate server (or servers), and access IRIS (or Cache) over a network connection. The answer is yes it can, but the information on how to set it up in this way has been admittedly a bit tricky to discover.
Let's imagine if you would like to write some real web application, for instance, some simple clone of medium.com. Such sort of application can be written using any different language on the backend side, or with any framework on the frontend side. So many ways to do the same application, and you can look at this project. Which offers a bunch of frontends and backends realizations for exactly the same application. And you can easily mix them, any chosen frontend should work with any backend.
Let me introduce the same application realization for InterSystems IRIS on a backend side.
It is also an example of a customized command extension (ZZJSN) in Caché / Ensemble & IRIS
This is the Caché version for fast JSON formatting. But iIt also works in IRIS . To allow parallel existence in IRIS with the previous example this is named ZZJSN
This is a coding example working on Caché 2018.1.3 and IRIS 2020.2
It will not be kept in sync with new versions
It is also NOT serviced by InterSystems Support !
install and usage
Packed Pretty.xml installs routine ZPretty in any namespace. calling $$Do^ZPretty(input,[filler],[newline])returns a wrapped JSON string. filler is the optional string for the indent, default = " " newline is optional, default = $C(13,10) input accepts: JSON_String, JSON_Stream, %DynamicAbstractObject
This is a coding example working on Caché 2018.1.3
It will not be kept in sync with new versions
It is also NOT serviced by InterSystems Support !
Full backport from IRIS for Windows (x86-64) 2020.1 (Build 215U) Mon Mar 30 2020 20:14:33 EDT
IRIS brought us an excellent %JSON.Package It is an essential component of the Project Manager (ZPM) This backport makes it available also in Caché and builds a base to eventually backport also ZPM.
Over the past year or so, my team (Application Services at InterSystems - tasked with building and maintaining many of our internal applications, and providing tools and best practices for other departmental applications) has embarked on a journey toward building Angular/REST-based user interfaces to existing applications originally built using CSP and/or Zen. This has presented an interesting challenge that may be familiar to many of you - building out new REST APIs to existing data models and business logic.
Sometimes you need quickly and easily import data into IRIS. For this, an IRIS import manager has been developed.
This application allows you to import JSON data and also provides a really simple interface for transferring data from MongoDB collections to IRIS globals. It has never been so easy.
ObjectScript doesn't include any built-in method for appending one JSON dynamic array to another. Here's a code snippet I use that's equivalent to the JavaScript concat() method.
Call it with any number of arguments to concatenate them into a new array. If an argument is a dynamic array, its elements will be added. Otherwise the argument itself will be added.
While the classic solution followed rather close the concepts and design of the ancestors Caché / IRIS allows a more modern approach to flexible/multidimensional properties
Though the access is quite comfortable (in traditional COS sense) there are 2 main restrictions that hurt:
#1) It is not saved to disk unless your application includes code to save it specifically. #2) It cannot be stored in or exposed through SQL tables there are some more I'll show how to overcome these limits
I enjoy the challenge of being in a contest. Currently I participate in InterSystems IRIS with REST API Programming Contest. My idea for this contest was to create an app to help me keep track of tasks for my Status Reports. I started with the template provided by Evgeny Shvarov. I created a persistent class for Tasks and a REST Dispatch class. I defined my URL map and I even figured out how to test my REST app using Postman.