1
1
{ ***************************************************************************
2
2
3
- Copyright (c) 2016-2020 Kike Pérez
3
+ Copyright (c) 2016-2022 Kike Pérez
4
4
5
5
Unit : Quick.Core.Serializer.Json
6
6
Description : Core Json Serializer
7
7
Author : Kike Pérez
8
8
Version : 1.8
9
9
Created : 12/10/2019
10
- Modified : 18/06/2020
10
+ Modified : 17/05/2022
11
11
12
12
This file is part of QuickCore: https://github.com/exilon/QuickCore
13
13
@@ -57,6 +57,7 @@ TJsonSerializer = class(TInterfacedObject,ISerializer)
57
57
function ToObject (aObject : TObject; const aJson: string) : TObject; overload;
58
58
function ToArray <T>(const aJson : string) : TArray<T>;
59
59
function ToValue (const aJson : string) : TValue;
60
+ function Options : TSerializerOptions;
60
61
end ;
61
62
62
63
implementation
@@ -66,6 +67,7 @@ implementation
66
67
constructor TJsonSerializer.Create;
67
68
begin
68
69
fSerializer := Quick.Json.Serializer.TJsonSerializer.Create(TSerializeLevel.slPublicProperty,True);
70
+ fSerializer.UseGUIDLowerCase := True;
69
71
end ;
70
72
71
73
destructor TJsonSerializer.Destroy;
@@ -104,6 +106,11 @@ function TJsonSerializer.FromValue(aValue: TValue; aIndent: Boolean): string;
104
106
Result := fSerializer.ValueToJson(aValue,aIndent);
105
107
end ;
106
108
109
+ function TJsonSerializer.Options : TSerializerOptions;
110
+ begin
111
+ Result := fSerializer.Options;
112
+ end ;
113
+
107
114
procedure TJsonSerializer.SetSerializationLevel (const Value : TSerializationLevel);
108
115
begin
109
116
fSerializer.SerializeLevel := Quick.Json.Serializer.TSerializeLevel(Integer(Value ));
0 commit comments