-
-
Notifications
You must be signed in to change notification settings - Fork 1
LBPT
调皮豆干 edited this page Oct 15, 2023
·
2 revisions
LBPT is a new format to serialize/deserialize your data like json and xml.
Its full name is Line Based Property Table.
LBPT is simple and easy reading because of it's based on line by line.
The root syntax is set around key-value pair, which link to a property and its content.
In LBPT, there are two ways to indicate a property and its content, single line property and multi-lines property.
Syntax: <PropertyName>: <PropertyValue>
For example,
Name: Oliver
Age: 23
Id: 000-0000
Additional, the can also be replaced with .
This is for non-basic data type -- user defined class/struct.
For example,
Name: Oliver 2
Age: 18
Info.Birthdate: 2005.03.21
Info.Education: University
Info.PhoneNumbers[0]: 123-4567
Info.PhoneNumbers[1]: 321-7654
At this time, you can use '.' to interpret sub property in one class.
And you can also use syntax like <PropertyPath>[<Index>] to indicate a iterable property like List and Array.