× The internal search function is temporarily non-functional. The current search engine is no longer viable and we are researching alternatives.
As a stop gap measure, we are using Google's custom search engine service.
If you know of an easy to use, open source, search engine ... please contact support@midrange.com.



We're on 7.3 and I have a working program processing JSON transactions. I'm to start processing some new transactions and am not sure what issues I might have. The program currently uses Data-Into and YAJLINTO.

The new transactions looks like this:


{"id":396,"payload":"{\"name\":{\"firstName\":\"JAMES\",\"lastName\":\"SHUE\",\"id\":null,\"suffix\":null,\"middleName\":\"B\"},\"dob\":\"1955-01-01\",\"someNumber\":\"123456789\",\"tin\":null,\"workPhone\":null,\"homePhone\":null}","internalAccountNumber":12345,"as400AccountNum":12345678902,"eventType":"DELETE","source":"SUCCESSOR","status":"PENDING","submitDate":"2021-04-08 15:37:03","createdDate":"2021-04-08 15:37:03","createdBy":"unknown","lastModifiedDate":"2021-04-08 15:37:03","lastModifiedBy":"unknown"}

My question is about the "payload" object which is a JSON inside of a JSON.


1. Should this be defined as just a nested array? Something like this:

dcl-ds txSuccessorJSONDoc qualified;
ID VarChar(20) inz('0');

Dcl-ds PAYLOAD;
FIRSTNAME varchar(14) inz('');
MIDDLENAME varchar(13) inz('');
LASTNAME varchar(20) inz('');
SUFFIX varchar(3) inz('');
DOB varchar(10) inz('');
SOMENUMBER varchar(9) inz('');
TIN varchar(9) inz('');
WORKPHONE varchar(10) inz('0');
HOMEPHONE varchar(10) inz('0');
End-Ds;

USERID VarChar(128) inz('0');
INTERNALACCOUNTNUMBER VarChar(9) inz('0');
AS400ACCOUNTNUM VarChar(12) inz('0');
EVENTTYPE varchar(10) inz('');
SOURCE varchar(50) inz('');
STATUS varchar(50) inz('');
SUBMITDATE varchar(25) inz('');
CREATEDDATE varchar(25) inz('');
CREATEDBY varchar(128) inz('');
LASTMODIFIEDDATE varchar(25) inz('');
LASTMODIFIEDBY varchar(128) inz('');
CREATEDDATE varchar(25) inz('');
End-ds;


1. I'm told the embedded slashes in the payload object should be recognized and ignored by the JSON processor. Do I have to do anything different for that portion of the JSON to process? I'm not finding much on this with Google.

TIA
Jack


[CFNC]

This email, including any documents, files, or previous email messages attached to it, has been sent from an email account of College Foundation Inc., (CFI) and may contain confidential, proprietary, or legally privileged information belonging to CFI. If you are not the intended recipient, any dissemination, distribution, or copying of this email or its attachments is strictly prohibited. If you have received this email in error, please immediately notify the sender by email and destroy the original email and any attachments.

As an Amazon Associate we earn from qualifying purchases.

This thread ...

Follow-Ups:

Follow On AppleNews
Return to Archive home page | Return to MIDRANGE.COM home page

This mailing list archive is Copyright 1997-2024 by midrange.com and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available on our policy page. If you have questions about this, please contact [javascript protected email address].

Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.