Skip to content

Instantly share code, notes, and snippets.

View timleavitt's full-sized avatar

Tim Leavitt timleavitt

View GitHub Profile
@isc-bspead
isc-bspead / cosJSON.isc
Last active December 21, 2016 08:00
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()