Skip to content

Конвертация XML в JSON для языка программирования Cache Object Script

Notifications You must be signed in to change notification settings

Sabit2092/xmlToJsonCache

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

xmlToJsonCache

Connvert XML to JSON in Cache Object Script

For import Jar to Cache, should open STUDIO -> Tools -> Add-Ins -> Master Java Gateway

First put path to jar file named xmlToJson.jar

Second, put path to json-20180813.jar to Additional ClassPaths field

After import, the converter can be called like this:

ClassMethod xmlToJson(message As %String) As %Status { Set result = $$$OK

try {
	Set gateway=##class(%Net.Remote.Gateway).%New()
 	Set status=gateway.%Connect("127.0.0.1",55555)
 	
 	if 'status Quit	
 	set obj = ##class(ParseXML.Parse).%New(gateway) 	
 	set res = obj.convertXMLtoJSON(message)
 	
 	Set result = res
}Catch ex {
	Do ex.Log()
	Write ex.DisplayString(),!
	ZWrite %objlasterror
}

Quit result

}

About

Конвертация XML в JSON для языка программирования Cache Object Script

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages