Blob Text in TMS WEB Core

Hello good morning, I have doubts on the following question ...
I have a column in a Text Blob Table that is being supplied with a JSON.
The problem is when you read this column on my Web page that is being deployed with TMS WEB Core, a column comes in this format:

ClienteJson: "ewAiAGYAYQBuAHQAYQBzAGkAYQAiADoAIgBDAGwAZQBtAGUAbgB0AGUAIgAsACIAaQBkAFUAcwB1AGEAcgBpAG8AIgA6ACIAewAwADAARAA4ADcAOAA4AEQALQA3AEMAMwA2AC0ANABFADcAQgAtADkAQQBDADQALQAxAEYAQQA3AEMAMwA0AEEAOAA5AEIANQB9ACIALAAiAGMAbwBkAGkAZwBvACIAOgAiACIALAAiAGMAcABmAEMAbgBwAGoAIgA6ACIANAA2ADUAOQA1ADQANwA0ADAAMAAwACIALAAiAHIAZwBJAGUAIgA6ACIAIgAsACIAYwBsAGEAcwBzAGUAIgA6ADAALAAiAG4AbwBtAGUAUgBhAHoAYQBvACIAOgAiAFIAbwBuAGEAbABkAG8AIgAsACIAcwBlAHgAbwAiADoAIgAiACwAIgB0AGUAbABlAGYAbwBuAGUAIgA6ACIAIgB9AA0ACgA="

What should I do to convert this column to a JSObject?

Not sure, is this a value that was encoded in a specific way?

JSon was inserted in the database as follows:

var
  Json: TStringList;
begin
  Json := TStringList.Create;
  try
    Json.Text := TJson.ObjectToJsonString(Entity_1);
    Entity_2.Json.AsUnicodeString := Json.Text;
    FObjManager.Flush(Entity_2);
  finally
    Json.Free;
  end;
end;

In the WEB core I'm trying to get data from this field like this:

var
  Entity_2, Json: TJSObject;
  sJson: JSValue;
begin
  Entity_2 := JS.toObject(Response.Result);
  sJson := Entity_2['Json'];
  Json := Js.toObject(sJson);
end;
1 Like

Here is a small sample that shows how to deal with XData blobs and Web Core.

WebCoreBlob.zip (20.4 KB)

1 Like

Obrigado Wagner

1 Like