Closed worksofliam closed 5 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:
This is the last pressing issue before a PR can be made.
Thanks, Liam Barry
You are looking in a file you have replaced: The original before you began is stored in library JSONXMLORG
Because
jx_GetInt
is not a real function, it is not defined in theJSONXML.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
toJSONXML.rpgle
and also rename the namespace to usejx_
.This has to be done with the following API:
json_getInt
- https://github.com/sitemule/noxDB/blob/b3a15fea9dfd7786d4def41eda8facde5b878ebd/headers/JSONPARSER.rpgle#L325json_httprequest
- https://github.com/sitemule/noxDB/blob/b3a15fea9dfd7786d4def41eda8facde5b878ebd/headers/JSONPARSER.rpgle#L839json_memuse
- https://github.com/sitemule/noxDB/blob/b3a15fea9dfd7786d4def41eda8facde5b878ebd/headers/JSONPARSER.rpgle#L691json_clear
- https://github.com/sitemule/noxDB/blob/b3a15fea9dfd7786d4def41eda8facde5b878ebd/headers/JSONPARSER.rpgle#L671JSON_ARRAYAPPEND
- https://github.com/sitemule/noxDB/blob/b3a15fea9dfd7786d4def41eda8facde5b878ebd/headers/JSONPARSER.rpgle#L671JSON_ARRAYSLICE
https://github.com/sitemule/noxDB/blob/b3a15fea9dfd7786d4def41eda8facde5b878ebd/headers/JSONPARSER.rpgle#L437json_AsJsonTextMem
- missing last parameter - https://github.com/sitemule/noxDB/blob/b3a15fea9dfd7786d4def41eda8facde5b878ebd/headers/JSONPARSER.rpgle#L526JSON_COPYVALUE
- https://github.com/sitemule/noxDB/blob/b3a15fea9dfd7786d4def41eda8facde5b878ebd/headers/JSONPARSER.rpgle#L338JSON_USE_LOCALE
const - https://github.com/sitemule/noxDB/blob/b3a15fea9dfd7786d4def41eda8facde5b878ebd/headers/JSONPARSER.rpgle#L457json_NodeCheckSum
- https://github.com/sitemule/noxDB/blob/b3a15fea9dfd7786d4def41eda8facde5b878ebd/headers/JSONPARSER.rpgle#L395json_traceSetId
- https://github.com/sitemule/noxDB/blob/b3a15fea9dfd7786d4def41eda8facde5b878ebd/headers/JSONPARSER.rpgle#L847JSON_APPROXIMATE_TOTALROWS
const - https://github.com/sitemule/noxDB/blob/b3a15fea9dfd7786d4def41eda8facde5b878ebd/headers/JSONPARSER.rpgle#L751xml_SetAttrValue
- missing new parameter