#1 2019-05-10 08:56:32

bigheart
Member
Registered: 2014-08-01
Posts: 45

Unsupported tkString is issued when RecordSaveJson is executed

Hi everyone,

I have some problem with mORMot.
Error is : TJSONCustomParseRTTI.CreateFromRTTI("TMyString") unspported tkString

Type
  TMyString = string[10];

TMyRec = record
 MyStr: TMyString;
end;

Var MyRec: TMyRec;

...

LUtf8 := RecordSaveJson(MyRec, TypeInfo(TMyRec)); <<=== Error throw here

How can i solve the above problem?

Thanks in advance.

Offline

#2 2019-05-10 09:23:04

ab
Administrator
From: France
Registered: 2010-06-21
Posts: 14,182
Website

Re: Unsupported tkString is issued when RecordSaveJson is executed

It states that ShortStrings are currently unsupported within records.

You have to use a regular RawUTF8/string instead.

Offline

Board footer

Powered by FluxBB