Skip to content

Instantly share code, notes, and snippets.

View daimor's full-sized avatar

Dmitry Maslennikov daimor

View GitHub Profile
@daimor
daimor / cosJSON.isc
Created December 21, 2016 08:00 — forked from isc-bspead/cosJSON.isc
Macros for writing forward compatible JSON code in InterSystems Caché 2016.1
#include %occReference
#if $$$comClassDefined("%Library.Object")
#define jsonClassIsLatestVersion $classIsLatestVersion
//usage: obj.$$$jsonClassIsLatestVersion()
#define jsonExtends $extends
//usage: {}.$$$jsonExtends(classname)
#define jsonFromJSON $fromJSON
//usage: {}.$$$jsonFromJSON(string)
#define jsonGetIterator $getIterator
//usage: obj.$$$jsonGetIterator()