Einzelnen Beitrag anzeigen

Der schöne Günther

Registriert seit: 6. Mär 2013
6.110 Beiträge
 
Delphi 10 Seattle Enterprise
 
#9

AW: Erste Schritte mit Rest.Json.pas: Wann braucht man einen eigenen TJsonInterceptor

  Alt 2. Okt 2014, 13:03
Danke, da bin ich schon durchgeschwommen. Ich würde im Aufruf noch eins höher auf TTypeMarshaller<TSerial>.MarshalData(Data: TObject); gehen. Die ist nicht nur (trotz der Größe) gut lesbar, sondern hat auch Dokumentation (die es nicht ins Docwiki geschafft hat):

Zitat:
If no user converters are defined, it tries to use the default
ones. If a type converter exists then that one is used. If a field converter
is used that the field converter is used. The field converter has precedence
over the type one.

Auch: Kommentar aus DbxJsonReflect.pas:
Zitat:
/// These are the fields for which there is already a built-in
/// conversion/reversion: integer, string, char, enumeration, float, object. For
/// these types the field values are ignored and user conversion is expected:
/// set, method, variant, interface, pointer, dynArray, classRef, array.

Produktiv habe ich heute bislang fast nichts geschafft, aber immerhin einiges gelernt

Geändert von Der schöne Günther ( 2. Okt 2014 um 13:05 Uhr)
  Mit Zitat antworten Zitat