procedure Method (const This, Params: ISuperObject;var Result: ISuperObject);

// Also, this is an enumeration of its data type:
TSuperType = (stNull, stBoolean, stDouble, stInt, stObject, stArray, stString, stMethod);


Test code:

unit Unit1;

interface

uses
  Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
  Dialogs, StdCtrls, Keyboard;

type 
  TForm1 =class (TForm)
    Button1: TButton;
    Button2: TButton;
    procedure Button1Click (Sender: TObject);
    procedure Button2Click (Sender: TObject);
  end ;

var
  Form1: TForm1;

implementation

{$ R * .dfm}

uses SuperObject;

// Method 1; The parameter list is specified, but no parameters are used here
procedure Method1 (const This, Params: ISuperObject;var Result: ISuperObject);
begin 
  ShowMessage ('Hello');
end ;

// Method 2; The second parameter is used here; the second here is the first one when called
procedure Method2 (const This, Params: ISuperObject;var Result: ISuperObject);
begin
  ShowMessage (Params.AsJSon);
end ;

// Method 3; the first parameter is used here; the first parameter value does not need to be passed when used, it represents the object itself using the method
procedure Method3 (const This, Params: ISuperObject;var Result: ISuperObject);
begin
  ShowMessage (This.AsJSon);
end ;

// Method 4; The third parameter is used here; this is the return value when called, if you do not assign a value to it, there will be no return value when called
procedure Method4 (const This, Params: ISuperObject;var Result: ISuperObject);
begin
  Result: = This;
  Result.Merge (Params, True); {Merge}
end ;


// The first method of use
procedure TForm1.Button1Click (Sender: TObject);
var
  jo: ISuperObject;
begin 
  jo: = SO ('{"X": "Y"}');
  jo.M ['jm1']: = @ Method1;
  jo.M ['jm2']: = @ Method2;
  jo.M ['jm3']: = @ Method3;
  jo.M ['jm4']: = @ Method4;

  jo.call ('jm1');                       // Hello

  jo.call ('jm2', SO ('{"A": "B"}'));      // {"A": "B"}
  jo.call ('jm2', '{"A": "B"}');          // {"A": "B"}

  jo.call ('jm3');                       // {"X": "Y"}

  jo.call ('jm4', '{"B": null}');
  ShowMessage (jo.AsJSon);               // {"X": "Y", "B": null}
end ;

// The second method of use
procedure TForm1.Button2Click (Sender: TObject);
var
  t, jo: ISuperObject;
begin 
  jo: = SO ('{"X": "Y"}');
  jo.M ['jm1']: = @ Method1;
  jo.M ['jm2']: = @ Method2;
  jo.M ['jm3']: = @ Method3;
  jo.M ['jm4']: = @ Method4;

  jo ['jm1 ()'];                            // Hello

  jo ['jm2 (' + '{"A": "B"}' + ')'];         // {"A": "B"}
  jo ['jm2 ((A: B))'];                       // {"A": "B"}

  jo ['jm3 ()'];                            // {"X": "Y"}

  jo ['jm4 (' + '{"B": null}' + ')'];
  ShowMessage (jo.AsJSon);                 // {"X": "Y", "B": null}
end ;

end .