Check that you are writing out your header first. This always happens to me.
Thanks
 John Slanina
On 8/27/19, 8:39 AM, "WEB400 on behalf of B Stone" <web400-bounces@xxxxxxxxxxxxxxxxxx on behalf of bvstone@xxxxxxxxx> wrote:
    Is this backwards?
    
      %len(jsonData) = JSON_BUF_SIZE;
    
    Or shouldn't this:
    
      rc = YAJL_copyBuf( 1208
                                      : %addr(jsonData: *data)
                                      : JSON_BUF_SIZE
                                      : len );
    
    Be this:
    
      rc = YAJL_copyBuf( 1208
                                      : %addr(jsonData: *data)
                                      : %size(jsonData)
                                      : len );
    
    I guess I don't follow what you're trying to do.  If you're just trying to
    write the JSON to the requester using HTTP (apache) check
    out yajl_writeStdout().
    On Tue, Aug 27, 2019 at 5:59 AM Cabero <cabero@xxxxxxxxxxxxx> wrote:
    
    > Hello.
    >
    >  I would appreciate input as I can't get rid of the first two lines and
    > the third has the { right at the end. Here is the code -
    > 
https://ibmrestapis.blogspot.com/p/blog-page_26.html
    >
    > Ã-*£…*£`£¨--…z@ ----"‰ƒ £‰-*a'¢-*^@ƒˆ (tm)¢…£~¤£†`ø
    > %
    > %       {
    >     "success": true,
    >     "errmsg": "",
    >     "count": 2,
    >     "item": [
    >         {
    >             "CompanyCode": 200,
    >             "BranchCode": 222,
    >             "SLATime": 22,
    >             "SLAPrewarnTime": 33,
    >             "SendEmail": "N",
    >             "SendSMS": "N",
    >             "RecordStatus": "D"
    >         },
    >         {
    >             "CompanyCode": 300,
    >             "BranchCode": 20,
    >             "SLATime": 2,
    >             "SLAPrewarnTime": 3,
    >             "SendEmail": "Y",
    >             "SendSMS": "Y",
    >             "RecordStatus": ""
    >         }
    >     ]
    > }
    > @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
    >
    > Yours sincerely.
    > Esteban Cabero
    > www.linkedin.com/in/cabero
    >
    >      Cell: +27(0)843963122
    > --
    > This is the Web Enabling the IBM i (AS/400 and iSeries) (WEB400) mailing
    > list
    > To post a message email: WEB400@xxxxxxxxxxxxxxxxxx
    > To subscribe, unsubscribe, or change list options,
    > visit: 
https://lists.midrange.com/mailman/listinfo/web400
    > or email: WEB400-request@xxxxxxxxxxxxxxxxxx
    > Before posting, please take a moment to review the archives
    > at 
https://archive.midrange.com/web400.
    >
    >
    -- 
    This is the Web Enabling the IBM i (AS/400 and iSeries) (WEB400) mailing list
    To post a message email: WEB400@xxxxxxxxxxxxxxxxxx
    To subscribe, unsubscribe, or change list options,
    visit: 
https://lists.midrange.com/mailman/listinfo/web400
    or email: WEB400-request@xxxxxxxxxxxxxxxxxx
    Before posting, please take a moment to review the archives
    at 
https://archive.midrange.com/web400.
    
    
As an Amazon Associate we earn from qualifying purchases.