[fpc-pascal] Parameter Checking in fpjsonrpc

Michael Van Canneyt michael at freepascal.org
Tue Jan 28 13:31:09 CET 2020

On Tue, 28 Jan 2020, Simon Ameis wrote:

>> It is mising, but not forgotten; I have it on my todo list still,
>> together
>> with some other items for JSON-RPC
>> If you feel like implementing some rudimentary checks, please feel free.
> Let me see, what I can do next week.
> At least some checks if a parameter object has the required parameters
> should be doable.
> Maybe you could give me some hints on details:
> - How should an array correspond to ParamDef? Ignore, trigger exception,
> if array of objects, check parameters on each object?

Not sure I understand what you mean. If the params are passed as an array, then the
elements of the array should reflect the paramdefs

> - What to do on additional parameters of an object? Silently ignore them
> or shall they raise an exception?

I would make this an additional option in the TJSONRPCOPTIONS enumerated:


More information about the fpc-pascal mailing list