Re: JSON Tools Was: Re: C-objects and memory use

2017-08-17 Thread Rick Hazey via 4D_Tech
First, let me say I wasn’t knocking 4D but answering the question Kirk Brooks asked: "At the risk of appearing really dense what are the specific things you can do with NTK that you can't do with native 4D?”. My answer is that JSON isn’t fully supported and I gave an example, so I’m not sure wh

Re: JSON Tools Was: Re: C-objects and memory use

2017-08-09 Thread Cannon Smith via 4D_Tech
I can! :-) -- Cannon.Smith Synergy Farm Solutions Inc. Hill Spring, AB Canada 403-626-3236 > On Aug 9, 2017, at 1:34 PM, David Adams via 4D_Tech <4d_tech@lists.4d.com> > wrote: > > Sorry, I don't have a Forum link to the right request, bu

Re: JSON Tools Was: Re: C-objects and memory use

2017-08-09 Thread David Adams via 4D_Tech
> So many times in the past, and even still today, 4D will add a now property to > a form object that can only be set by using the Property List in the Design > environment. So no programatic way to “set” or “get” the new property. Glaring > example of this are new listbox properties. Then after so

Re: JSON Tools Was: Re: C-objects and memory use

2017-08-09 Thread Tim Nevels via 4D_Tech
On Aug 9, 2017, at 2:00 PM,David Adams wrote: > Thanks for saying this so clearly. This is the reality that is behind my > feature request(s) for a set of native tools to deal with arbitrary JSON > input/output. For now, I've got NTK but it is a feature set that any modern > tool should have out o

Re: JSON Tools Was: Re: C-objects and memory use

2017-08-08 Thread David Adams via 4D_Tech
On Tue, Aug 8, 2017 at 5:14 PM, Keisuke Miyako via 4D_Tech < 4d_tech@lists.4d.com> wrote: > it seems this view just keeps coming up... > > I am sorry if the documentation or marketing material or presentation or > some other form of communication gave the wrong impression, but Object and > Array

Re: JSON Tools Was: Re: C-objects and memory use

2017-08-08 Thread Keisuke Miyako via 4D_Tech
it seems this view just keeps coming up... I think it is important to understand that 4D didn't look at JSON and implement it as Object and Array Object, doing a really bad job at it, as it were, no, it happened the other way round... Object and Array Object were implemented first, and then JSO

Re: JSON Tools Was: Re: C-objects and memory use

2017-08-08 Thread Kirk Brooks via 4D_Tech
Rick, You have to use the JSON PARSE ARRAY command. http://doc.4d.com/4Dv15/4D/15.4/JSON-PARSE-ARRAY.301-3274446.en.html I wrote a wrapper for JSON strings to look at the first char and then use the appropriate method. This is one place where NTK is more convenient since it makes that adjustment

Re: JSON Tools Was: Re: C-objects and memory use

2017-08-08 Thread Rick Hazey via 4D_Tech
It’s been a long time since I’ve used 4D and JSON but as I recall one problem was the inability to parse JSON where the top level is an array instead of an object. IOW, if your JSON looked like this: [ 1, 2, 3 ] 4D couldn’t parse it. A pretty big deviation from the standard. On the other hand,

Re: JSON Tools Was: Re: C-objects and memory use

2017-08-02 Thread David Adams via 4D_Tech
On Wed, Aug 2, 2017 at 10:51 AM, Jody Bevan via 4D_Tech < 4d_tech@lists.4d.com> wrote: > David: > > Of your four options I choose #1. ;-) > I think that we all do ;-) Short of 4D improving the language & compiler, I think the least-worst option is rolling your own code scanner. Such an effort w

Re: JSON Tools Was: Re: C-objects and memory use

2017-08-02 Thread Jody Bevan via 4D_Tech
David: Of your four options I choose #1. ;-) Jody Bevan ARGUS Productions Inc. Developer Argus Productions Inc. > On Aug 2, 2017, at 11:34 AM, David Adams via 4D_Tech <4d_tech@lists.4d.com> > wrote: > > > Without compile-time verification o

Re: JSON Tools Was: Re: C-objects and memory use

2017-08-02 Thread David Adams via 4D_Tech
All of the new features look great and will be most welcome. I'm on R3 now so R4 should hopefully be an easy transition. For people on 16.1, the new features won't appear until 17.0. Dots will definitely make it easier to work with known element names, so that's great. I haven't looked at JSON Va

Re: JSON Tools Was: Re: C-objects and memory use

2017-08-02 Thread Tom Swenson via 4D_Tech
FWIW, it sounds like the object notation in v16r4 is going to alleviate much of the pain in dealing with JSON objects.. JSON Validate, Collections and a NULL command! http://blog.4d.com/en-whats-new-in-4d-v16-r4/ ** 4D Inte

Re: JSON Tools Was: Re: C-objects and memory use

2017-07-26 Thread David Adams via 4D_Tech
On Wed, Jul 26, 2017 at 12:13 PM, Kirk Brooks via 4D_Tech < 4d_tech@lists.4d.com> wrote: > David, > On Wed, Jul 26, 2017 at 10:14 AM, David Adams via 4D_Tech < > 4d_tech@lists.4d.com> wrote: > > Can you give me an example of the kind of situation you're talking about?​ > Incredibly jet-lagged a

Re: JSON Tools Was: Re: C-objects and memory use

2017-07-26 Thread Kirk Brooks via 4D_Tech
David, On Wed, Jul 26, 2017 at 10:14 AM, David Adams via 4D_Tech < 4d_tech@lists.4d.com> wrote: > Hey, I'm fine that 4D does whatever it wants in C_OBJECTs however they want > to. Their program, their rules. What I was responding to was Kirk's point > about JSON per se. If you want to use JSON as

Re: JSON Tools Was: Re: C-objects and memory use

2017-07-26 Thread David Adams via 4D_Tech
Hey, I'm fine that 4D does whatever it wants in C_OBJECTs however they want to. Their program, their rules. What I was responding to was Kirk's point about JSON per se. If you want to use JSON as an interchange format, we don't have a complete set of tools natively in the 4D language. JSON is norma

Re: JSON Tools Was: Re: C-objects and memory use

2017-07-26 Thread Peter Bozek via 4D_Tech
On Wed, Jul 26, 2017 at 12:09 PM, Benedict, Tom via 4D_Tech < 4d_tech@lists.4d.com> wrote: > David Adams dpad...@gmail.com writes: > > >Well, 4D's tools for manipulating JSON are sub-standard, if your goal is > to parse/produce JSON freely. In this respect, the XML tools

JSON Tools Was: Re: C-objects and memory use

2017-07-26 Thread Benedict, Tom via 4D_Tech
David Adams dpad...@gmail.com writes: >Well, 4D's tools for manipulating JSON are sub-standard, if your goal is to >parse/produce JSON freely. In this respect, the XML tools (external libraries >built into 4D) are far more standard and comprehensive. Along these lines,