Question
· 2 hr ago

How can i handle boolean JSON in IRIS?

Hi folks!

How can we handle JSON boolean types in IRIS?

I'm having a UI sending me a JSON payload as:

{

  "id": 1,
  "strprop": "string",
  "boolprop": true

}

The class is 

MyPackage.MyClass Extends (%Persistent%JSON.Adaptor)

{

strprop as %String;

boolprop as %Boolean;

}

And I'm trying to update an instance of a MyPackage.MyClass and I'm getting a datatype-related error, something like %JSONImportInternal+269...

How am I supposed to deal with booleans in JSON with IRIS and ObjectScript? Any best practice advices?

Product version: IRIS 2025.3
Discussion (1)1
Log in or sign up to continue