[fpc-pascal] jsonrtti and integer arrays
Michael Van Canneyt
michael at freepascal.org
Wed Jul 8 11:20:43 CEST 2015
On Wed, 8 Jul 2015, Felipe Monteiro de Carvalho wrote:
> Hello,
>
> I see that according to http://wiki.freepascal.org/Streaming_JSON one
> can use TStringList for an array of strings, but this seams to work
Small linguistic intermezzo: "seems".
"seams" exists, but is something different :)
> only for writing JSON, is it possible to read array of strings?
Currently not, although I have somewhere code to do this.
>
> And how to read an array of integers?
Currently it is not, but I already have code to do this (see restbase unit in fcl-web).
>
> Also, can my json be an array instead of an object?
In what sense ?
> A non-rtti simple example would also be good, since it looks like that
> the rtti version cannot read arrays.
Yes, I should improve the unit, I have several ideas and already partial implementations to improve it.
Ideally, the code in restbase should be replaced with calls to rttiutils.
Michael.
More information about the fpc-pascal
mailing list