Skip to content

Commit f0e2128

Browse files
author
Arnaud Bouchez
committed
made all TJsonSaveContext methods and fields public
- as needed for custom serialization
1 parent 2f4ffda commit f0e2128

File tree

2 files changed

+15
-7
lines changed

2 files changed

+15
-7
lines changed

src/core/mormot.core.json.pas

Lines changed: 14 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1541,20 +1541,28 @@ TJsonSaveContext = record
15411541
{$else}
15421542
TJsonSaveContext = object
15431543
{$endif USERECORDWITHMETHODS}
1544-
private
1544+
public
1545+
/// the associated stream writer for the JSON output
15451546
W: TJsonWriter;
1547+
/// serialization options as specified for this process
15461548
Options: TTextWriterWriteObjectOptions;
1549+
/// the RTTI information of the current serialized type
15471550
Info: TRttiCustom;
1551+
/// the RTTI information of the current serialized property
1552+
// - is likely to be nil outside of properties serialization
15481553
Prop: PRttiCustomProp;
1549-
procedure Add64(Value: PInt64; UnSigned: boolean);
1550-
procedure AddShort(PS: PShortString);
1551-
procedure AddShortBoolean(PS: PShortString; Value: boolean);
1552-
procedure AddDateTime(Value: PDateTime; WithMS: boolean);
1553-
public
15541554
/// initialize this low-level context
15551555
procedure Init(WR: TJsonWriter;
15561556
WriteOptions: TTextWriterWriteObjectOptions; Rtti: TRttiCustom);
15571557
{$ifdef HASINLINE}inline;{$endif}
1558+
/// some basic functions to append some Int64 JSON value
1559+
procedure Add64(Value: PInt64; UnSigned: boolean);
1560+
/// some basic functions to append some shorstring JSON value
1561+
procedure AddShort(PS: PShortString);
1562+
/// some basic functions to append some "name":boolean JSON value
1563+
procedure AddShortBoolean(PS: PShortString; Value: boolean);
1564+
/// some basic functions to append some TDateTime JSON value
1565+
procedure AddDateTime(Value: PDateTime; WithMS: boolean);
15581566
end;
15591567

15601568
/// internal function handler for JSON persistence of any TRttiParserType value

src/mormot.commit.inc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
'2.1.6309'
1+
'2.1.6310'

0 commit comments

Comments
 (0)