Koen, 4D does not handle dot notation (not quite true : see http://doc.4d.com/4Dv16/4D/16/QUERY-BY-ATTRIBUTE.301-3036512.en.html <http://doc.4d.com/4Dv16/4D/16/QUERY-BY-ATTRIBUTE.301-3036512.en.html>) ; I have written a component published on jan 12
This component emulates 4D standard commands for objects such as OB Set or OB Get to add access to properties or sub-objects by path with dot notation. It has been clearly inspired by OBJ_Module of Cannon Smith but differs by : - it emulates standard commands and does not have commands by type - it resolves paths with arrays elements - it gives some advanced controls such as search in an array by the value of a property. It does not intend to replace all functions of OBJ_Module. You can download it here <http://forums.4d.fr/4DBB_Main/x_User/4018/files/18896249.zip>. Method OBJ_Test gives several operational examples ; some functions are not yet implemented. For this thread, I separate setter and getter ; the two commands have same syntax and you can copy the setter, change one letter and have the getter OBJ_Set(MyObject;"MyPath";->MyValue) ... do something OBJ_Get(MyObject;"MyPath";->MyValue) Direct access to the post where you can download the component : http://forums.4d.fr/Post//18896257/1/ <http://forums.4d.fr/Post//18896257/1/> Cannon Smith has also added this feature in its component. Cordialement, Bernard Escaich > Le 29 mars 2017 à 11:24, Koen Van Hooreweghe via 4D_Tech > <4d_tech@lists.4d.com> a écrit : > > Hi Piotr, > > I would advise JSON or rather 4D objects. 4D objects and JSON are not exactly > the same, but very closely related. JSON is actually a text representation of > a 4D object. The 4D debugger handles objects nicely too. You can store your > data into a 4D object and then retrieve the values in your 4D Write area > using your proposed commands. Unfortunately there is no dot notation (yet) > available. > But if your needs are not too complex, you could easily implement a basic > version yourself. > > HTH > Koen > > Op 29-mrt.-2017, om 09:02 heeft Piotr Chabot Stadhouders via 4D_Tech > <4d_tech@lists.4d.com> het volgende geschreven: > >> Has anybody already done "my new way" and have experience with this? >> Does this make sense or is there a better way to do this? >> Is JSON for example a better alternative over XML? > > > > -------------------- > Compass bvba > Koen Van Hooreweghe > Kloosterstraat 65 > 9910 Knesselare > Belgium > tel +32 495 511.653 > > ********************************************************************** > 4D Internet Users Group (4D iNUG) > FAQ: http://lists.4d.com/faqnug.html > Archive: http://lists.4d.com/archives.html > Options: http://lists.4d.com/mailman/options/4d_tech > Unsub: mailto:4d_tech-unsubscr...@lists.4d.com > ********************************************************************** ********************************************************************** 4D Internet Users Group (4D iNUG) FAQ: http://lists.4d.com/faqnug.html Archive: http://lists.4d.com/archives.html Options: http://lists.4d.com/mailman/options/4d_tech Unsub: mailto:4d_tech-unsubscr...@lists.4d.com **********************************************************************