How to Clearly Represent Hierarchical Data in Plain Text

September 17, 2024

Sometimes You end up writing on a Library computer. Logged into a plain text editor and you need to represent some data but indentation isnt an option as the web editor your working with jumps you to the submit button. Can’t use org tables/vimwiki tables because you don’t have access to your editor with your custom vimrc and plugins to auto format pipes into nice human readable tables. What to do?

Method 1: Custom Delimiters

Using a custom delimiter for diferent levels

Level1 Name
- Level2 Property1: Value1
- Level2 Property2: Value2
-- Level3 Property1: Value1
-- Level3 Property2: Value2
Level1 Another Name
- Level2 Property1: Value1

Method 2: Using Symbols For Different Levels

* Level1: Name
  - Level2: Sublevel1
    + Property1: Value1
    + Property2: Value2
  - Level2: Sublevel2
    + Property1: Value1
* Level1: Another Name
  - Property1: Value1

Pros And Cons

Aspect Custom Delimiters Symbols
Pros - Clarity and Precision: Tailored to fit specific needs. - Consistency: Well-defined system reduces ambiguity. - Flexibility: Can be customized for unique data formats. - Readability: Descriptive delimiters enhance understanding. - Simplicity: Easy to recognize and understand. - Readability: Clear visual representation of hierarchy. - Ease of Use: Familiar to many users for lists and hierarchies. - Visual Structure: Immediate hierarchy visualization.
Cons - Complexity: Overly complex delimiters can create confusion. - Maintenance: Requires additional documentation and adjustments. - Ambiguity: Potential overlap with data content. - Limited Depth: Might struggle with very deep hierarchies. - Inconsistency: Varying interpretations of symbols. - Interpretation Variability: Different people might interpret symbols differently. - Lack of Precision: Less descriptive than custom delimiters.