sitemule / noxDB

Not only XML. SQL,JSON and XML made easy for IBM i
MIT License
41 stars 20 forks source link

Prototypes missing from JSONXML.rpgle #9

Closed worksofliam closed 5 years ago

worksofliam commented 6 years ago

Because jx_GetInt is not a real function, it is not defined in the JSONXML.rpgle header.

It was previously defined in the JSONPARSER.rpgle, before we made a new one generate every time the makefile was called.

You can see that here: https://github.com/sitemule/noxDB/blob/b3a15fea9dfd7786d4def41eda8facde5b878ebd/headers/JSONPARSER.rpgle#L325

Looks like we just need to add the following headers from the previous version of JSONPARSER.rpgle to JSONXML.rpgle and also rename the namespace to use jx_.

This has to be done with the following API:

The originals a now in DKSRV206/JSONXML/QRPGLESRC

worksofliam commented 6 years ago

Hi! All the new prototypes and consts have been pushed up to my fork, which I will make a PR for today.

The last issue is that the examples show xml_SetAttrValue having 3 parameters, but our prototypes only have two.

        xml_SetAttrValue(pt    : 'MyAttribute' : 'First value');
        xml_SetAttrValue(pt    : 'MyAttribute' : 'New Value');
        xml_SetAttrValue(pt    : 'a2'          : 'a2 1');
        xml_SetAttrValue(pt    : 'a2'          : 'a2 2');

I have tried searching old sources for the definition:

> FNDSTRPDM STRING(SETATTRVALUE) FILE(NOXDB/QSRC) MBR(*ALL) OPTION(*DSP)  
  0 members match the Find string in file QSRC.                           
> FNDSTRPDM STRING(SETATTRVALUE) FILE(JSONXML/QSRC) MBR(*ALL) OPTION(*DSP)
  0 members match the Find string in file QSRC.                           

I also tried searching the local repo, but nothing but examples come up:

image

This is the last pressing issue before a PR can be made.

Thanks, Liam Barry

NielsLiisberg commented 5 years ago

You are looking in a file you have replaced: The original before you began is stored in library JSONXMLORG

image