Icon View Thread

The following is the text of the current message along with any replies.
Messages 1 to 7 of 7 total
Thread Modern JSON
Mon, Apr 4 2016 12:28 PMPermanent Link

Matthew Jones

Could someone point me at the complete guide to JSON serialisation in
EWB 2 please? I need to do some complex serialising, and now is the
time to learn it properly. Thanks!

--

Matthew Jones
Mon, Apr 4 2016 12:39 PMPermanent Link

Raul

Team Elevate Team Elevate

On 4/4/2016 12:28 PM, Matthew Jones wrote:
> Could someone point me at the complete guide to JSON serialisation in
> EWB 2 please? I need to do some complex serialising, and now is the
> time to learn it properly. Thanks!

I don't believe there is a complete guide but i would start with TReader
9http://www.elevatesoft.com/manual?action=viewcomp&id=ewb2&comp=TReader)
and TWriter
(http://www.elevatesoft.com/manual?action=viewcomp&id=ewb2&comp=TWriter).

Not sure of what you need exactly but i'd suggest design your own EWB
classes that JSON is parsed to/from and look at other framework helpers
like like TCollection
(http://www.elevatesoft.com/manual?action=viewcomp&id=ewb2&comp=TCollection)
to help you out as well.

Raul
Tue, Apr 5 2016 3:42 AMPermanent Link

Matthew Jones

Raul wrote:

> TReader and TWriter

Of course - thank you.

--

Matthew Jones
Tue, Apr 5 2016 5:39 AMPermanent Link

Matthew Jones

Matthew Jones wrote:

> TWriter

Bit of a documentation opportunity here. The TWriter text starts saying
that the TWriter.Create has parameters to blah blah, but there is no
Create definition page, so I can't look up the details.

I've found the example, which gives a lot of clues on how to use this.
I think there may be a blog post a-comin'.

--

Matthew Jones
Tue, Apr 5 2016 8:29 AMPermanent Link

Raul

Team Elevate Team Elevate

On 4/5/2016 5:39 AM, Matthew Jones wrote:
> Bit of a documentation opportunity here. The TWriter text starts saying
> that the TWriter.Create has parameters to blah blah, but there is no
> Create definition page, so I can't look up the details.
>
> I've found the example, which gives a lot of clues on how to use this.
> I think there may be a blog post a-comin'.

Good point.

No doubt Tim will revise this but you do have the source code so TWriter
looks as follows:

constructor TWriter.Create(ADateTimeFormat: TDateTimeFormat=dtfRaw;
                           AIndentSpaces: Integer=3;
                           AIncludeLineFeeds: Boolean=True;
                           ACompressWhitespace: Boolean=False);

The only other option for ADateTimeForamt is dtfISO8601.

TReader is simpler

constructor TReader.Create(ADateTimeFormat: TDateTimeFormat=dtfRaw);


Raul
Tue, Apr 5 2016 9:03 AMPermanent Link

Matthew Jones

Raul wrote:

>  but you do have the source code

Indeed, would be nowhere without that. Has been very useful and I've
now put together a sample, now in the binaries, which might help
someone else put together what they need. A summary of the
http://www.elevatesoft.com/forums?action=view&category=ewb&id=ewb_genera
l&page=1&msg=5813#5813 post would be good sometime, but all the
information is there if you read it through. (And thanks to Mark for
going into it before us!)

--

Matthew Jones
Tue, Apr 5 2016 6:40 PMPermanent Link

Tim Young [Elevate Software]

Elevate Software, Inc.

Avatar

Email timyoung@elevatesoft.com

Matthew,

<< Bit of a documentation opportunity here. The TWriter text starts saying that the TWriter.Create has parameters to blah blah, but there is no Create definition page, so I can't look up the details. >>

Yep, already noted the first time it was requested.  It's an issue with the documentation generation, which also has to handle Delphi and C++Builder constructors, so it will take some time before I can get to it.

Tim Young
Elevate Software
www.elevatesoft.com
Image