#1 Re: mORMot 1 » About seralize Tcollectionitem » 2019-05-02 08:10:45

I review mromot code  find TJsonToObject record ,but HandleCollection method can't   custom add Tcollectionitem

#2 mORMot 1 » About seralize Tcollectionitem » 2019-05-02 08:08:59

wangchong
Replies: 1

How can I serialize different TCollectionitem that belong to the same Tcollection and are derived from the same parent class?
example:
    my subclass  :TCollectionitem1  tcollectionitem2    parent class:Tcollectionionitem     
Collection Class:TMyCollection

#3 Re: mORMot 1 » How to Inserialize arrays with CustomSeralize? » 2019-02-25 00:01:20

thanks !
Below is my code for your reference

json:
'[{"Key":"Eric","RowData":["Eric",15]}]'

class function TSpiderDataitem.FVClassReader(const aValue: TObject;
  aFrom: PUTF8Char; var aValid: boolean;
  aOptions: TJSONToObjectOptions): PUTF8Char;
var
  V: TSpiderDataItem absolute aValue;
   Doc :TDocVariantData;
   Values:array[0..10] of TValuePUTF8Char;
begin
  result := JSonDeCode(aFrom, ['Key','RowData'], @Values[0],true);
  aValid := (result <> nil);
  if aValid then
  begin
    v.Key :=VAlues[0].ToString;
    Doc.InitJSON(Values[1].Value);
    V.FRowData :=Doc.Values;
    (V.Collection as TSpiderDataCollection).parent.AddHash(
    v.Key,V
    );
  end;


end;

class procedure TSpiderDataItem.FVClassWriter(const aSerializer:
    TJSONSerializer; aValue: TObject; aOptions: TTextWriterWriteObjectOptions);
var
  V: TSpiderDataItem absolute aValue;
  Row:TDocVariantData;
begin
  Row.InitArrayFromVariants(v.RowData);
  aSerializer.AddJSONEscape(['Key',v.Key,'RowData',Variant(Row)]);
end;

#4 mORMot 1 » How to Inserialize arrays with CustomSeralize? » 2019-02-24 02:53:10

wangchong
Replies: 2

I registered a custom reader and writer

code:
  aSerializer.AddJSONEscape(['Key',V.Key,'RowData',v.RowData]);
but  return array proptery string is null
{"Key":"Eric","RowData":null}
rowdata is  variant type dynamic  array

#5 Re: mORMot 1 » Does mormot support asynchronous access? » 2019-01-24 00:10:32

I mean  restapi provides asynchronous callbacks

#6 mORMot 1 » Does mormot support asynchronous access? » 2019-01-23 00:56:40

wangchong
Replies: 4

Does mormot support asynchronous access?

#7 Re: mORMot 1 » mormot httpapiserver not suppport fontawesome? » 2019-01-11 06:13:35

@Chaa
I only used sample 09 as an example:
static html is bootstrap  template

#9 mORMot 1 » mormot httpapiserver not suppport fontawesome? » 2019-01-10 07:05:39

wangchong
Replies: 5

Momort does not support such this
path  http://localhost:888/root/assets/the font - awesome / 4.5.0 / fonts/fontawesome - webfont. Woff?V = 4.5.0

#10 Re: mORMot 1 » Fast CSV Process unit » 2018-11-26 01:16:52

BTW: please send to me  a  mormot    code guide , i'd like to  try rewrite  it to fits mormot standard
my email is  wangchong1104@gmail.com

#11 Re: mORMot 1 » Fast CSV Process unit » 2018-11-26 01:11:34

I used lazarus development, in osx raspberry pie and  other Linux systems have been successfully tested

#12 Re: mORMot 1 » Fast CSV Process unit » 2018-11-26 00:27:58

https://github.com/Ericwang1104/SuperCSV
this is my git proejct  supercsv  It can open csv files larger than 20g in size and with support express filter.

#13 mORMot 1 » Fast CSV Process unit » 2018-11-24 23:27:49

wangchong
Replies: 4

Hello ab I have a csv processing unit. it can filter expressions. If you need it, I can provide it  join mormot project.

#14 mORMot 1 » How do I access Data using only the forward cursor » 2018-07-06 02:08:44

wangchong
Replies: 1

I tried the following code but it ran out of memory

SQL := 'SELECT ID,HTML FROM TenderData ';
  Tbl :=FDB.ExecuteList([TTenderData],SQL);

Board footer

Powered by FluxBB