Last active
May 28, 2016 17:32
-
-
Save stphnwlkr/3ab1f152c038a69c7ffe2b57c0cfe65f to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public void function genDCJSON(){ | |
/* Get the Data */ | |
var data = queryExecute("Select deviceCode, deviceNomenclature from mybase_devicecodes_tbl",{},{}); | |
/* Set base file path */ | |
var strPath = expandPath('/'); | |
/* Delete existing file */ | |
if(fileExists(strPath&'library\json\dcodes.json')){ | |
cffile(action='delete',file=strPath&'library\json\dcodes.json'); | |
} | |
/* Generate new file */ | |
var a = serializeJSON(data,'struct'); | |
cffile(action='write', file=strPath&'library\json\dcode.json', output=a); | |
return; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment