skip_nulls error

Discussions relating to the ScottKlement.com port of the open source YAJL JSON Reader/Generator. This includes the YAJL tool as well as the YAJLR4, YAJLGEN, YAJLINTO and YAJLDTAGEN add-ons from ScottKlement.com. http://www.scottklement.com/yajl/
Post Reply
alessandrotoninelli
Posts: 2
Joined: Thu Feb 15, 2024 9:05 am

skip_nulls error

Post by alessandrotoninelli »

Code: Select all

{
    "articles": [
         {
            "mode": "edit",
            "art1ark": "100",
            "art1dec":null,
            "art1fok":null
        },
         {
            "mode": "edit",
            "art1ark": "101",
            "art1dec":null,
            "art1fok":"FOK010F"
        }
    ]
}
Using this json and the YAJLINTO skip_nulls parser directive, you may see this error:

9. QrnDiReportName and QrnDiReportNameCcsid cannot be retrieved at this time.

This specific case only occurs if there is a list of objects and if the last attribute of the first element (in this case, art1fok) is null.

Code: Select all

data-into RequestCrt %data($CGI.body_data:
                                 'case=convert countprefix=num_ +
                                   allowmissing=yes allowextra=yes')
                              %PARSER('YAJL/YAJLINTO':
                         '{ +
                            "skip_nulls": true +
                          }'
                         );  
why ?
Post Reply