EldoS | Feel safer!

Software components for data protection, secure storage and transfer

How do I post a JSON object.

Also by EldoS: MsgConnect
Cross-platform protocol-independent communication framework for building peer-to-peer and client-server applications and middleware components.
#29358
Posted: 05/02/2014 07:22:49
by Bogdan H. (Standard support level)
Joined: 04/03/2014
Posts: 10

Hi,

I created a JSON object using

jsonObject:TElJsonObject;
jsonObject := TElJsonObject.Create();
jsonObject.SetStringValue('SomeKey','SomeValue');

How do I serialize this JSON object so that i can post it using a TElHTTPSClient?

UPDATE: Solved it using SBJSON.Write(jsonObject)
#29361
Posted: 05/02/2014 10:46:25
by Eugene Mayevski (EldoS Corp.)

SBJSON unit contains Write and Read functions that are used for serialization. But they are lower-level.

You can use TElRESTClient component which lets you POST or PUT a TElJSonEntity (and TElJSonObject is a descendant of TElJSonEntity).


Sincerely yours
Eugene Mayevski

Reply

Statistics

Topic viewed 492 times

Number of guests: 1, registered members: 0, in total hidden: 0




|

Back to top

As of July 15, 2016 EldoS Corporation will operate as a division of /n software inc. For more information, please read the announcement.

Got it!