Skip to content

Instantly share code, notes, and snippets.

@isc-bspead
isc-bspead / cosJSON.isc
Last active Dec 21, 2016
Macros for writing forward compatible JSON code in InterSystems Caché 2016.1
View cosJSON.isc
#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()