You are not logged in.
Pages: 1
Hi,
seems that we have small problem. The data which is saved by :
SomeVar.test := 'test';
LIni := TDocVariantData(SomeVar).ToTextPairs;
and after is loaded:
TDocVariantData(SomeVar).InitCSV(LIni);
WriteLn(SomeVar.test) // print "test"
LIni := TDocVariantData(SomeVar).ToTextPairs;
TDocVariantData(SomeVar).InitCSV(LIni);
WriteLn(SomeVar.test) // print "\"test\""
works improper (the documentation says : the supplied content may have been generated by ToTextPairs() method). The SomeVar.test contains improper string (encoded JSON string).
The partial solution is:
LIni := TDocVariantData(SomeVar).ToTextPairs('=', #13#10, twNone);
but this is not the point. Probably some additional parameter for InitCSV is needed.
best regards,
Maciej Izak
Offline
Isn't it related to https://synopse.info/forum/viewtopic.php?id=4048 ?
Offline
Rather no. InitCSV don't decode, encoded string by ToTextPairs with twJSONEscape option (there is no way to use in proper way InitCSV when twJSONEscape was used in ToTextPairs).
best regards,
Maciej Izak
Offline
Pages: 1