Ganz unkompliziert gefragt: Was mache ich falsch?
Delphi-Quellcode:
uses System.Json.Builders, System.Json.Writers;
procedure p();
var
writer: TJsonWriter;
builder: TJSONObjectBuilder;
begin
writer :=
nil; builder :=
nil;
try
writer := TJsonObjectWriter.Create(True);
builder := TJSONObjectBuilder.Create(writer);
builder.Clear();
// Exception: EJSONCollectionBuilderError
// This operation is not permitted without assigned callback
finally
builder.Free(); writer.Free();
end;
end;