The sandbox now contains an updated version of the "json.testGroup" file which 
includes the test
cases for the new functionality. In order to run it, you would need to replace 
the existing
"json.testGroup" in "oorexx\test\trunk\ooRexx\extensions\json". 

This concludes the present work on "json.cls". If there are no objections 
raised in the next two
weeks I would like to replace the current version of both, "json.cls" and 
"json.testGroup" with the
sandbox version.

---rony


On 06.06.2021 18:19, Rony G. Flatscher wrote:
>
> 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

Reply via email to