* Do not call parsing if JSON is empty (e.g. return 204 with empty body)

This commit is contained in:
Michaël Van Canneyt 2024-11-25 14:42:29 +01:00
parent e15f731a9b
commit 8d24a28c56

View File

@ -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