mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-08-29 16:40:25 +02:00
* Do not call parsing if JSON is empty (e.g. return 204 with empty body)
This commit is contained in:
parent
e15f731a9b
commit
8d24a28c56
@ -742,6 +742,10 @@ begin
|
||||
Addln('begin');
|
||||
indent;
|
||||
Addln('Result := Default(%s);', [aType.PascalName]);
|
||||
Addln('if (aJSON='''') then');
|
||||
indent;
|
||||
Addln('exit;');
|
||||
undent;
|
||||
if DelphiCode then
|
||||
Addln('lObj := TJSONObject.ParseJSONValue(aJSON,True,True) as TJSONObject;')
|
||||
else
|
||||
|
Loading…
Reference in New Issue
Block a user