User bio
404 bio not found
Member since Aug 9, 2021
Replies:

Hey Juan,

So at a guess - Intersystems is doing the thing where they just take whatever error you return, and tack on their own error on top of it.  In some cases they return all errors, and in others they just pick off the first one of them and return that (GetOneError or something similar).  This is a bug (in my opinion) - you should open a WRC ticket and have them fix it.  They might also be able to give you a workaround.


Good luck!

WHO DARES SUMMON ME!

Oh, hi Evgeny!  Great to see you, hope you're well!

For everyone else, Evgeny is right, of course (because he's quoting me laugh) but note that in newer versions (IRIS, for instance), you can make use of the %JSON.Adaptor to do something like:

Class Test.DoesItJSON Extends (%RegisteredObject, %JSON.Adaptor)
{
Property aString As %String;
Property anInteger As %Integer;
}

The do something like:

s obj=##class(Test.DoesItJSON).%New()
s obj.aString="Hello"
s obj.anInteger=123

d obj.%JSONExportToString(.jsonstring)
zw jsonstring
    jsonstring="{""aString"":""Hello"",""anInteger"":123}"

This is better for creating new classes (again in later versions than you're on, you need to use the jsonProvider or the altJsonProvider) that you think you're going to want to serialize into JSON.

Certifications & Credly badges:
Kyle has no Certifications & Credly badges yet.
Global Masters badges:
Followers:
Following:
Kyle has not followed anybody yet.