Skip to content

Commit

Permalink
made all TJsonSaveContext methods and fields public
Browse files Browse the repository at this point in the history
- as needed for custom serialization
  • Loading branch information
Arnaud Bouchez committed Nov 24, 2023
1 parent 2f4ffda commit f0e2128
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 7 deletions.
20 changes: 14 additions & 6 deletions src/core/mormot.core.json.pas
Expand Up @@ -1541,20 +1541,28 @@ TJsonSaveContext = record
{$else}
TJsonSaveContext = object
{$endif USERECORDWITHMETHODS}
private
public
/// the associated stream writer for the JSON output
W: TJsonWriter;
/// serialization options as specified for this process
Options: TTextWriterWriteObjectOptions;
/// the RTTI information of the current serialized type
Info: TRttiCustom;
/// the RTTI information of the current serialized property
// - is likely to be nil outside of properties serialization
Prop: PRttiCustomProp;
procedure Add64(Value: PInt64; UnSigned: boolean);
procedure AddShort(PS: PShortString);
procedure AddShortBoolean(PS: PShortString; Value: boolean);
procedure AddDateTime(Value: PDateTime; WithMS: boolean);
public
/// initialize this low-level context
procedure Init(WR: TJsonWriter;
WriteOptions: TTextWriterWriteObjectOptions; Rtti: TRttiCustom);
{$ifdef HASINLINE}inline;{$endif}
/// some basic functions to append some Int64 JSON value
procedure Add64(Value: PInt64; UnSigned: boolean);
/// some basic functions to append some shorstring JSON value
procedure AddShort(PS: PShortString);
/// some basic functions to append some "name":boolean JSON value
procedure AddShortBoolean(PS: PShortString; Value: boolean);
/// some basic functions to append some TDateTime JSON value
procedure AddDateTime(Value: PDateTime; WithMS: boolean);
end;

/// internal function handler for JSON persistence of any TRttiParserType value
Expand Down
2 changes: 1 addition & 1 deletion src/mormot.commit.inc
@@ -1 +1 @@
'2.1.6309'
'2.1.6310'

0 comments on commit f0e2128

Please sign in to comment.