[fpc-pascal] Re: RESTful JSON: Your thoughts about implementation

bsquared bwcode4u at gmail.com
Thu Nov 8 19:54:44 CET 2012


On 11/08/2012 09:56 AM, Michael Van Canneyt wrote:
>
>
> On Thu, 8 Nov 2012, bsquared wrote:
>
>> On 11/08/2012 09:47 AM, Michael Van Canneyt wrote:
>>>
>>>
>>> On Thu, 8 Nov 2012, bsquared wrote:
>>>
>>>> Hello,
>>>>
>>>> I thought I would put this out to see what helpful information I could
>>>> gather.
>>>>
>>>> I am in need of some JSON and HTTP functionality.  I am thinking about
>>>> using some pieces from WST and I was looking for some input on this.
>>>>
>>>> What I am doing is pulling data from a JSON-RESTful web application
>>>> and storing it in SQLite as Key / Value Pairs along with some meta
>>>> data.
>>>>
>>>> This data will be pushed back to same web application on some interval.
>>>>
>>>> Additionally, I would like cross-platform compatibility between
>>>> Linux/Windows{,-mobile?}/Android.
>>>
>>> Why do you need WST for this ? if it is REST (something WST knows
>>> nothing about), then you'll work just fine with only the fpJSON and
>>> synapse stacks ?
>>>
>>> Michael.
>>> _______________________________________________
>>> fpc-pascal maillist  -
>>> fpc-pascal at lists.freepascal.org
>>> http://lists.freepascal.org/mailman/listinfo/fpc-pascal
>>>
>>
>> I was looking at the TJsonRpcBaseFormatter as well as the factory
>> implementations *_http_protocol units.
>>
>> Seemed like some of the work had been done here.
>
> These protocols are aimed towards RPC, which is not something I
> associate with REST implementations, so your solution seems confusing.
>
> Without more details it is hard to give advice...
>
> Michael.
> _______________________________________________
> fpc-pascal maillist  -
> fpc-pascal at lists.freepascal.org
> http://lists.freepascal.org/mailman/listinfo/fpc-pascal
>

Thank you, your input is helpful.  It has been some time since I have 
used the tools.

I thought the json parsing in the TJsonRpcBaseFormatter may be a good 
starting place.  To my semi-trained eye it will deserialize the json 
into a TStack object, but I have not done any testing yet.  Am I not 
interpretting this correctly?

As far as the http stack goes -- I'm open.  I recall from my past 
experience that synapse is stable and lightweight.

-- 
Regards,
Brian




More information about the fpc-pascal mailing list