Icon View Thread

The following is the text of the current message along with any replies.
Messages 1 to 2 of 2 total
Thread Generic json class
Wed, Dec 21 2016 3:44 PMPermanent Link

Christian Kaufmann

Hi,

I would like to read data from a json api. Is there a generic class for a json structure? Or do I
need to define objects with properties for each value I need?

cu Christian
Thu, Dec 22 2016 3:46 AMPermanent Link

Matthew Jones

Christian Kaufmann wrote:

> I would like to read data from a json api. Is there a generic class for a json structure? Or do I
> need to define objects with properties for each value I need?

You can do both, but the object with *published* properties is the easiest. EWB v1 had a generic reader that allows you to query a string for arbitrary values. This is still in v2, but v2 gained a much easier way.

Look for TParser for the old way, and TReader/TWriter and TPersistent Load/Save functions. All the details are in these forums on how to get clever with arrays etc, or ask.

--

Matthew Jones
Image