[Lazarus] fcl-web or BrookFramework queryfields array

silvioprog silvioprog at gmail.com
Fri Apr 15 21:33:08 CEST 2016


On Fri, Apr 15, 2016 at 4:25 PM, Leonardo M. Ramé <l.rame at griensu.com>
wrote:
[...]

> It works pefectly por param=value&..., but I don't know how to parse array
> type values.
>
> example: ?filters[0]['filter']=name&filters[0]['value']=john


This filter can be easily parser if you send it as:

?filters[0].filter=name&filters[0].value=john

The parser can populate a class structure like:

=== code ===

  TYourObject = class
  published
    property filter: string ...;
    property value: string ...;
  end;

  TFilters = class(TFPGMapObject<TYourObject>)
  end;

=== /code ===

--
Silvio Clécio
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.lazarus-ide.org/pipermail/lazarus/attachments/20160415/1cb6f7a3/attachment-0003.html>


More information about the Lazarus mailing list