Native JSON Object

Idea created by TobiasLiebhartKoschierSE on Jan 22, 2018

    At the moment, while I (we all) love the ability to pass multiple parameters using JSON I do not like how code loses its readability.


    When we compared variables the had IF statements like:

    IF [ isNew ] THEN


    IF [ myNumber = 12 ] THEN


    now we have

    IF [ JSONGetElement ( $JSON ; "isNew" ) ] THEN


    IF [ JSONGetElement ( $JSON ; "myNumber" ) = 12 ] THEN


    what I propose is a native VariableType that an be used like any other Variable but can be accessed in an Object Oriented way like in e.g. JavaScript.


    VariableType: Native JSON


    Set Variable [ #JSON.isNew ; Value : True ]


    Set Variable [ #JSON.myNumber ; Value : 12 ]


    and in IF statements

    IF [ #JSON.isNew ] THEN


    IF [ #JSON.myNumber = 12 ] THEN


    IF [ #JSON.myArray[2].myText = "Test" ] THEN



    and so on.


    This would need to be useable in every instance where a normal Variable can be used, and there should also be a global JSON Variable form.


    And we could need automatic TypeCasting so we need not provide the datatype.