Question Rick Prichett · Apr 14, 2021

ERROR #9406: Unexpected format for value of field, alternateId, using class base mapping

Getting the error "ERROR #9406: Unexpected format for value of field, alternateId, using class base mapping" in the trace. I have it defined as:

Class CDSM.MemberAPI.Response2 Extends (%Persistent, %XML.Adaptor, %JSON.Adaptor) [ Language = objectscript ]
{Property alternateId As %String;

  Property benefitPlanId As %String;

and the reply is sending:

[
    {
        "alternateId": "",
        "benefitPlanId": "FLSN4444",

Is there a way to handle the empty fields in the reply that is sent back?

Product version: IRIS 2020.1

Comments

Robert Cemper · Apr 14, 2021

try:

 Property alternateId As %String(%JSONNULL = 1);

  {
        "alternateId": null ,
        "benefitPlanId": "FLSN4444", 

0
Rick Prichett  Apr 15, 2021 to Robert Cemper

Found the issue. had to parse differently

0