go to post Alister Pino · Nov 23, 2021 HI Andrea, Could you report this as described in the vscode objectscript extension's README (https://github.com/intersystems-community/vscode-objectscript#reporting-...)? Best, Alister
go to post Alister Pino · Sep 28, 2021 The OREF you pasted in is a %Status object, so you can manipulate it with %SYSTEM.Status methods (see the documentation). To get the information between the /* ... */ you can use ##class(%SYSTEM.Status).GetErrorText(fileComp).
go to post Alister Pino · Sep 20, 2021 Hi Menno, Currently your solution creates an "extra" node because of the code Do jsonObj1.%Set("", obj2). %Set will always create a new node with parameter 1 as the key and parameter 2 as the value. It seems like what you really want to do is append all of the objects in obj2.OptOuts with obj1.OptOuts. You can do this by iterating through Obj2.OptOuts and using %Push to append each to Obj1.OptOuts. I've modified the code you provided to accomplish this: Class Test.TestClass { ClassMethod xxx() As %Status { Set tSc = $$$OK Set jsonObj1 = {}.%FromJSON("C:\temp\1.json") Set jsonObj2 = {}.%FromJSON("C:\temp\2.json") Do jsonObj1.%Remove("NextCursor") Do jsonObj2.%Remove("NextCursor") Set obj1 = jsonObj1.%Get("OptOuts") Set obj2 = jsonObj2.%Get("OptOuts") Set OptOuts2Iter = obj2.%GetIterator() While OptOuts2Iter.%GetNext(.key , .value ) { Do obj1.%Push(value) } Set objString = jsonObj1.%ToJSON() Set formatter = ##class(%JSON.Formatter).%New() Do formatter.FormatToStream(jsonObj1, .Streamobj) Set ResponseStream = ##class(%Stream.FileBinary).%New() Set ResponseStream.Filename = "C:\temp\3.json" Do ResponseStream.CopyFrom(.Streamobj) Set tSc = ResponseStream.%Save() Do ResponseStream.%Close() Return tSc } }
go to post Alister Pino · Sep 20, 2021 Hi Kevin. This doesn't look like a symptom of a known issue with a quick fix. I'd recommend contacting the WRC (https://www.intersystems.com/support-learning/support/) for support.
go to post Alister Pino · Jul 9, 2021 Does your user have the %Developer resource? To use the Atelier APIs your IRIS user needs %Developer. You can add this to your user via the system management portal at System > Security Management > Users.