Today I created <https://sourceforge.net/p/oorexx/code-0/HEAD/tree/sandbox/rony/json/> which contains a plug-in replacement for 'json.cls'. As a matter of fact it is nothing else but an updated version of Brandon W. Cherry's version.
Running json.testGroup with it yields the same results as with the one currently in ooRexx 5. The sandbox/rony/json/rexxdoc contains the ooRexxDoc documentation, just point your browser to "rexxdoc/oorexxdoc.html". The documentation got created with Alexander Seik's ooRexxDoc tool part of his ooRexx plugin for IntelliJ, available from <https://sourceforge.net/projects/bsf4oorexx/files/Sandbox/aseik/ooRexxIDEA/GA/2.0.3/>. The most important the new features in the sandbox version of 'json.cls': * ooRexxDoc comments, * handles any MapCollection (in addition to .Directory e.g. StringTable, Relation, etc.) and OrderedCollection (in addition to .Array e.g. List, Queue), * handles Rexx .nil correctly (produces a JSON 'null'), * supplies .json~true and .json~false Rexx objects (instances of the private class JsonBoolean) which can be used in Rexx instead of .true and .false, however when creating the JSON string these Rexx objects will cause the generation of the respective JSON values 'true' and 'false', * if a Rexx object has a MAKEJSON method, then that method will be used to create the JSON mapping, * if a Rexx object is not a string but has a MAKESTRING method, then that method will be used to create the JSON mapping, * if a Rexx object is not a string, but has a MAKEARRAY method, then that method will be used, * a JSON object can be created with the argument .true, which will make it create 'legible' (human-readable) JSON strings by injecting whitespace and linebreaks, aligning opening and closing brackets according the embedding level, * a new utility class method 'rexxObject=.json~fromJsonFile(filename)', * a new utiltity class method '.json~toJsonFile(filename, rexxObject[,legible=.true])' So suggesting to use this 'json.cls' version to replace the old version, if there are no objections. ---rony
_______________________________________________ Oorexx-devel mailing list Oorexx-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/oorexx-devel