Plans for JSON support

classic Classic list List threaded Threaded
10 messages Options
Reply | Threaded
Open this post in threaded view
|

Plans for JSON support

Tom DeMeo
Hi,


I’m curious what the plans are for future JSON support in Active4D. We have nice tools to write JSON, but not to read it. I know we can convert JSON to a collection, but it would be great to have commands to get JSON values directly from JSON objects as well as set them.

Are there plans to support the new 4D objects and related commands? If not, are there any plans to provide A4D commands to get JSON values?


Regards,


Tom DeMeo
_______________________________________________
Active4D-dev mailing list
[hidden email]
http://list.aparajitaworld.com/listinfo/active4d-dev
Archives: http://active4d-nabble.aparajitaworld.com/
Reply | Threaded
Open this post in threaded view
|

Re: Plans for JSON support

Aparajita Fishman
> I’m curious what the plans are for future JSON support in Active4D.

None at the moment.


> We have nice tools to write JSON, but not to read it. I know we can convert JSON to a collection, but it would be great to have commands to get JSON values directly from JSON objects as well as set them.

No language I know of provides this functionality, including 4D. Perhaps you don't quite understand what JSON is. As the official website says, "JSON (JavaScript Object Notation) is a lightweight data-interchange format." In other words, JSON is meant to be a *string* encoding of structured data, specifically designed as a way to send data over a network. JSON is *not* an object, it is a string representation of an object.

So one cannot "get" or "set" a JSON value, because it is not meant to be a dynamic object, it's meant to be a string used to import/export entire objects (or arrays of objects).


> Are there plans to support the new 4D objects and related commands?

I'd love to, but 4D does not provide any plugin support for objects, so currently it's impossible.


> If not, are there any plans to provide A4D commands to get JSON values?

See what I said above about JSON.

Peace,

 - Aparajita


_______________________________________________
Active4D-dev mailing list
[hidden email]
http://list.aparajitaworld.com/listinfo/active4d-dev
Archives: http://active4d-nabble.aparajitaworld.com/
Reply | Threaded
Open this post in threaded view
|

Re: Plans for JSON support

Tom DeMeo
I understand that JSON is a “string representation of an object” and not literally an object. Nonetheless, I think you would agree that it can be useful to have routines that simplify looking up the values that are stored in those strings.

> On Jan 10, 2016, at 3:28 PM, Aparajita Fishman <[hidden email]> wrote:
>
>> I’m curious what the plans are for future JSON support in Active4D.
>
> None at the moment.
>
>
>> We have nice tools to write JSON, but not to read it. I know we can convert JSON to a collection, but it would be great to have commands to get JSON values directly from JSON objects as well as set them.
>
> No language I know of provides this functionality, including 4D. Perhaps you don't quite understand what JSON is. As the official website says, "JSON (JavaScript Object Notation) is a lightweight data-interchange format." In other words, JSON is meant to be a *string* encoding of structured data, specifically designed as a way to send data over a network. JSON is *not* an object, it is a string representation of an object.
>
> So one cannot "get" or "set" a JSON value, because it is not meant to be a dynamic object, it's meant to be a string used to import/export entire objects (or arrays of objects).
>
>
>> Are there plans to support the new 4D objects and related commands?
>
> I'd love to, but 4D does not provide any plugin support for objects, so currently it's impossible.
>
>
>> If not, are there any plans to provide A4D commands to get JSON values?
>
> See what I said above about JSON.
>
> Peace,
>
> - Aparajita
>
>
> _______________________________________________
> Active4D-dev mailing list
> [hidden email]
> http://list.aparajitaworld.com/listinfo/active4d-dev
> Archives: http://active4d-nabble.aparajitaworld.com/

_______________________________________________
Active4D-dev mailing list
[hidden email]
http://list.aparajitaworld.com/listinfo/active4d-dev
Archives: http://active4d-nabble.aparajitaworld.com/
Reply | Threaded
Open this post in threaded view
|

Re: Plans for JSON support

Aparajita Fishman
> I understand that JSON is a “string representation of an object” and not literally an object. Nonetheless, I think you would agree that it can be useful to have routines that simplify looking up the values that are stored in those strings.

Actually, I wouldn't agree. Why should there be a whole set of JSON routines that duplicate existing syntax and functionality in collections (Active4D) or objects (4D)? I'm trying to explain that JSON is not meant to be used in that way. JSON is meant to be used like this:

- receive JSON data
- convert to object
- access and manipulate data in the object

or

- set data in an object
- convert to JSON
- send JSON data

That's how it's meant to be used, at a single point just after receiving or just before sending. As I said before, there is no point in looking up one or two values in a JSON string before parsing it in its entirety, because an implementation of that functionality would have to be parse it in its entirety to lookup those values.

Peace,

 - Aparajita


_______________________________________________
Active4D-dev mailing list
[hidden email]
http://list.aparajitaworld.com/listinfo/active4d-dev
Archives: http://active4d-nabble.aparajitaworld.com/
Reply | Threaded
Open this post in threaded view
|

Re: Plans for JSON support

Peter Gutbrod
In reply to this post by Tom DeMeo
Maybe I missed the point, but why are you not simply using the parse
json command in A4D. I use this all the time to work with JSON strings
within A4D.

Peter

> Tom DeMeo <mailto:[hidden email]>
> 10. Januar 2016 22:36
> I understand that JSON is a “string representation of an object” and
> not literally an object. Nonetheless, I think you would agree that it
> can be useful to have routines that simplify looking up the values
> that are stored in those strings.
>
>
> _______________________________________________
> Active4D-dev mailing list
> [hidden email]
> http://list.aparajitaworld.com/listinfo/active4d-dev
> Archives: http://active4d-nabble.aparajitaworld.com/
> Aparajita Fishman <mailto:[hidden email]>
> 10. Januar 2016 21:28
>> I’m curious what the plans are for future JSON support in Active4D.
>
> None at the moment.
>
>
>> We have nice tools to write JSON, but not to read it. I know we can convert JSON to a collection, but it would be great to have commands to get JSON values directly from JSON objects as well as set them.
>
> No language I know of provides this functionality, including 4D. Perhaps you don't quite understand what JSON is. As the official website says, "JSON (JavaScript Object Notation) is a lightweight data-interchange format." In other words, JSON is meant to be a *string* encoding of structured data, specifically designed as a way to send data over a network. JSON is *not* an object, it is a string representation of an object.
>
> So one cannot "get" or "set" a JSON value, because it is not meant to be a dynamic object, it's meant to be a string used to import/export entire objects (or arrays of objects).
>
>
>> Are there plans to support the new 4D objects and related commands?
>
> I'd love to, but 4D does not provide any plugin support for objects, so currently it's impossible.
>
>
>> If not, are there any plans to provide A4D commands to get JSON values?
>
> See what I said above about JSON.
>
> Peace,
>
>  - Aparajita
>
>
> _______________________________________________
> Active4D-dev mailing list
> [hidden email]
> http://list.aparajitaworld.com/listinfo/active4d-dev
> Archives: http://active4d-nabble.aparajitaworld.com/
> Tom DeMeo <mailto:[hidden email]>
> 10. Januar 2016 20:45
> Hi,
>
>
> I’m curious what the plans are for future JSON support in Active4D. We
> have nice tools to write JSON, but not to read it. I know we can
> convert JSON to a collection, but it would be great to have commands
> to get JSON values directly from JSON objects as well as set them.
>
> Are there plans to support the new 4D objects and related commands? If
> not, are there any plans to provide A4D commands to get JSON values?
>
>
> Regards,
>
>
> Tom DeMeo
> _______________________________________________
> Active4D-dev mailing list
> [hidden email]
> http://list.aparajitaworld.com/listinfo/active4d-dev
> Archives: http://active4d-nabble.aparajitaworld.com/

_______________________________________________
Active4D-dev mailing list
[hidden email]
http://list.aparajitaworld.com/listinfo/active4d-dev
Archives: http://active4d-nabble.aparajitaworld.com/
Reply | Threaded
Open this post in threaded view
|

Re: Plans for JSON support

Peter Jakobsson-2

On 11 Jan 2016, at 10:18, Peter Gutbrod <[hidden email]> wrote:

> Maybe I missed the point, but why are you not simply using the parse
> json command in A4D

Probably because he’d then have to rebuild the equivalent of 4D’s entire object support in Active 4D since…

On 10 Jan 2016, at 21:28, Aparajita Fishman <[hidden email]> wrote:

> 4D does not provide any plugin support for objects, so currently it's impossible.


…which probably isn’t trivial given that 4D is a multi-million pound company with thousands of users and made quite a huge deal about introducing that functionality. Maybe a more fruitful route would be to lobby them to expose object support for plugins rather than lobby Aparajita to re-invent and support that wheel in Active4D ;)


Peter
_______________________________________________
Active4D-dev mailing list
[hidden email]
http://list.aparajitaworld.com/listinfo/active4d-dev
Archives: http://active4d-nabble.aparajitaworld.com/
Reply | Threaded
Open this post in threaded view
|

Re: Plans for JSON support

Aparajita Fishman
>> 4D does not provide any plugin support for objects, so currently it's impossible.
>
> …which probably isn’t trivial given that 4D is a multi-million pound company with thousands of users and made quite a huge deal about introducing that functionality.

Funny that 4D made a big deal about introducing object support… 10 years after I had it in Active4D!

Peace,

 - Aparajita


_______________________________________________
Active4D-dev mailing list
[hidden email]
http://list.aparajitaworld.com/listinfo/active4d-dev
Archives: http://active4d-nabble.aparajitaworld.com/
Reply | Threaded
Open this post in threaded view
|

Re: Plans for JSON support

Michael Larue-2
Monday, January 11, 2016 at 5:07:02 PM

Hi Aparajita,

> Funny that 4D made a big deal about introducing object support… 10 years after I had it in Active4D!


I'm guessing that's because the original mindset of 4D was derived from procedural programming languages (ie, Pascal, etc.), not object-oriented languages.

Needed to have new blood brought onboard to implement new thinking, I guess. Plus, with a bigger company, change comes more slowly. We'll probably never know why it took them so long to do this--likely internal politics or something.

('Course, 4D could have hired _you_ 10 years ago--just think how cool 4D would be today if that had happened! :-)

Cheers!

Michael Larue

_______________________________________________
Active4D-dev mailing list
[hidden email]
http://list.aparajitaworld.com/listinfo/active4d-dev
Archives: http://active4d-nabble.aparajitaworld.com/
Reply | Threaded
Open this post in threaded view
|

Re: Plans for JSON support

Perkins, Bradley D
And Pascal had a 'Record' type when I learned it in the 80s. The one
language feature I really missed when I began with 4D in 92 was something
akin to Pascal's 'record' or a C 'struct'. The argument was that I could
always just 'use the database'. Aparajita thankfully solved that with
ObjectTools.

Brad

On 1/11/16, 9:14 AM, "[hidden email] on behalf of
Michael Larue" <[hidden email] on behalf of
[hidden email]> wrote:

>Monday, January 11, 2016 at 5:07:02 PM
>
>Hi Aparajita,
>
>> Funny that 4D made a big deal about introducing object supportŠ 10
>>years after I had it in Active4D!
>
>
>I'm guessing that's because the original mindset of 4D was derived from
>procedural programming languages (ie, Pascal, etc.), not object-oriented
>languages.
>
>Needed to have new blood brought onboard to implement new thinking, I
>guess. Plus, with a bigger company, change comes more slowly. We'll
>probably never know why it took them so long to do this--likely internal
>politics or something.
>
>('Course, 4D could have hired _you_ 10 years ago--just think how cool 4D
>would be today if that had happened! :-)
>
>Cheers!
>
>Michael Larue
>
>_______________________________________________
>Active4D-dev mailing list
>[hidden email]
>http://list.aparajitaworld.com/listinfo/active4d-dev
>Archives: http://active4d-nabble.aparajitaworld.com/

_______________________________________________
Active4D-dev mailing list
[hidden email]
http://list.aparajitaworld.com/listinfo/active4d-dev
Archives: http://active4d-nabble.aparajitaworld.com/
Reply | Threaded
Open this post in threaded view
|

Re: Plans for JSON support

Aparajita Fishman
In reply to this post by Michael Larue-2
>> Funny that 4D made a big deal about introducing object support… 10 years after I had it in Active4D!
>
>
> I'm guessing that's because the original mindset of 4D was derived from procedural programming languages (ie, Pascal, etc.), not object-oriented languages.

What they call "objects" are what the rest of the world calls dictionaries, maps, collections, etc. It's just a fundamental data type like arrays that every procedural language but 4D had from the very beginning. So that wasn't the reason.

Peace,

 - Aparajita


_______________________________________________
Active4D-dev mailing list
[hidden email]
http://list.aparajitaworld.com/listinfo/active4d-dev
Archives: http://active4d-nabble.aparajitaworld.com/