#2 Re: mORMot 1 » JSONToObject example - nested objects » 2019-06-27 10:11:52

Am posting here because the posting on the webpage suggested this particular topic - apologies if this is incorrect.

I am using a customreader function (D2007) to convert a JSON string to a record based on the example reference on;

http://blog.synopse.info/post/2013/12/1 … ialization

namely the example;

class function TTestServiceOrientedArchitecture.CustomReader(P: PUTF8Char;
  var aValue; out aValid: Boolean): PUTF8Char;
var V: TSQLRestCacheEntryValue absolute aValue;
    Values: TPUtf8CharDynArray;
begin
  result := JSONDecode(P,['ID','TimeStamp','JSON'],Values);
  if result=nil then
    aValid := false else begin
    V.ID := GetInteger(Values[0]);
    V.TimeStamp := GetCardinal(Values[1]);
    V.JSON := Values[2];
    aValid := true;
  end;
end;

but am trying to update my mORMot library and JSONDecode no longer accepts a TPUtf8CharDynArray (possibly changed to TValuePUTF8CharArray) but am struggling to work out what this should look like instead.

Thanks in advance

Chris

#3 mORMot 1 » Compilation error in D2007 » 2018-03-09 14:19:02

TheBlacksheep
Replies: 2

Hi

I've just tried the latest source from github and getting an error on line 30428 in mORMot.pas.

[DCC Error] mORMot.pas(30428): E2441 Inline function declared in interface section must not use local symbol 'Deref'

This is in Delphi2007 - is there a quick fix I can do locally?

TheBlackSheep

Board footer

Powered by FluxBB