-
Notifications
You must be signed in to change notification settings - Fork 86
NeonIgnore
Paolo Rossi edited this page Feb 7, 2024
·
4 revisions
The NeonIgnore
attribute is used to mark a field (property) that should be ignored by Neon when serializing or deserializing a Delphi structure to or from JSON.
TPerson = class
private
// .....
public
property FirstName: string read FFirstName write FFirstName;
property LastName: string read FLastName write FLastName;
[NeonIgnore] property FullName: string read GetFullName;
property Age: Integer read FAge write FAge;
property Country: string read FCountry write FCountry;
property City: string read FCity write FCity;
end;
Using NeonIgnore
the property FullName
will not be in the resulting JSON
{
"FirstName": "Paolo",
"LastName": "Rossi",
"Age": 50,
"Country": "Italy",
"City": "Piacenza"
}
Neon Libray • Project Home • paolo's Repositories