The added "value"
is an XData convention. To return an arbitrary value, you must return a TStream
object which you can add any value to it. For example:
uses {...}, Bcl.Json;
...
function TMyService.Data: TStream;
var
Data: TArray<string>;
begin
Result := TMemoryStream.Create;
TXDataOperationContext.Current.Handler.ManagedObjects.Add(Result);
SetLength(Data, 2);
Data[0] := 'First';
Data[1] := 'Second';
TJson.SerializeAs<TArray<string>>(Data, Result);
end;
Wasn't it already answered here? change JSON property name - #2 by wlandgraf