I am using Delphi XE. 

The following unit fails to compile with this error:

```
[DCC Error] GTSJSONSerializer.pas(27): E2506 Method of parameterized type declared 
   in interface section must not use 
   local symbol 'TSuperRttiContext.AsJson<GTSJSONSerializer.TGTSJSONSerializer<T>.T>'

```

Why is that? Is there a workaround?

```
unit GTSJSONSerializer;

interface

type
   TGTSJSONSerializer<T> = class
     class function SerializeObjectToJSON(const aObject: T): string;
     class function DeserializeJSONToObject(const aJSON: string): T;
   end;

implementation

uses
        SuperObject
      ;

class function TGTSJSONSerializer<T>.SerializeObjectToJSON(const aObject: T): string;
var
  SRC: TSuperRttiContext;
begin
  SRC := TSuperRttiContext.Create;
  try
    Result := SRC.AsJson<T>(aObject).AsString;
  finally
    SRC.Free;
  end;
end;

class function TGTSJSONSerializer<T>.DeserializeJSONToObject(const aJSON: string): T;
var
  LocalSO: ISuperObject;
  SRC: TSuperRttiContext;
begin
  SRC := TSuperRttiContext.Create;
  try
    LocalSO :=  SO(aJSON);
    Result := SRC.AsType<T>(LocalSO);
  finally
    SRC.Free;
  end;
end;

end.

```