Miyako, I've taken to always specifying the type when I use OB GET except in cases like copying a key from one object to another. I like that OB GET doesn't throw an error when it's typed and the key doesn't exist.
It would be interesting to hear about how they are able to parse mixed type json arrays sometime, as I think about a little more. On Sun, Oct 29, 2017 at 5:28 PM, Keisuke Miyako via 4D_Tech < 4d_tech@lists.4d.com> wrote: > I think that's because the assignment operator is typically over-ridden by > a toString() method or something similar in template or class based > languages. > > anyway, > > 4D is a strongly typed language, so the use of the 3rd argument "Is text" > does not remove the need to declare the left operand. > > if you > > $t:=OB Get($o;"foo";Is text) > > then you must > > C_TEXT($t) > > to make it work in compiled mode. > > > 2017/10/30 7:57、Kirk Brooks via 4D_Tech <4d_tech@lists.4d.com> のメール: > > > > This aspect of using text is in keeping with what I've noticed working > > with other platforms that use JSON heavily - they frequently make all the > > JSON values text. > > > > > ********************************************************************** > 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 > ********************************************************************** > -- Kirk Brooks San Francisco, CA ======================= *The only thing necessary for the triumph of evil is for good men to do nothing.* *- Edmund Burke* ********************************************************************** 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 **********************************************************************