You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The current serialize command can become verbose when converting a large serialized JSON string with nested subtrees into a JSON file. I propose adding an additional syntax to reduce the verbiage. Or even introduce a new command called deserialize that will convert a serialized tree into a JSON file.
Proposal:
A new syntax added to serialize.
or
A new command called deserialize. I'm more inclined to this option since the name accurately describes the proposed behavior.
We will use the following JSON to demonstrate the differences;
">" tells the program that the next value to read is a child node.
"<" tells the program to return to the parent node.
"&" tells the program that the next value to read is a sibling node.
Things to Note:
After specifying "hobbies" and its child nodes, a "<" symbol is appended. The first instinct is to append "&," but a "<" symbol is needed to tell the program to return to the parent node of "hobbies." This will correctly place "status" as a sibling of "age" and "hobbies."
The optional variable "--vars" is not needed since the serialized tree is one continuous string with no spaces.
The text was updated successfully, but these errors were encountered:
rydtran
changed the title
Improve Serialization Syntax
Reduce Verbiage in Serialize Command
Jul 28, 2022
The current
serialize
command can become verbose when converting a large serialized JSON string with nested subtrees into a JSON file. I propose adding an additional syntax to reduce the verbiage. Or even introduce a new command calleddeserialize
that will convert a serialized tree into a JSON file.Proposal:
A new syntax added to
serialize
.or
A new command called
deserialize
. I'm more inclined to this option since the name accurately describes the proposed behavior.We will use the following JSON to demonstrate the differences;
Old Syntax:
New Syntax:
Breaking Down the Syntax:
Things to Note:
The text was updated successfully, but these errors were encountered: