Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

dict Format Nesting #158

Closed
amydevs opened this issue Mar 21, 2024 · 2 comments
Closed

dict Format Nesting #158

amydevs opened this issue Mar 21, 2024 · 2 comments
Assignees
Labels
development Standard development r&d:polykey:core activity 1 Secret Vault Sharing and Secret History Management

Comments

@amydevs
Copy link
Contributor

amydevs commented Mar 21, 2024

Specification

Currently the dict format does just stringifes nested objects.

Instead, we want the object to displayed with the same dict formatter, with some right padding to indicate it is the inner value of the key above it.

We want to use 2 spaces ( ) as the indent, as \t is simply too big.

This should look like:

key1
  key2    value
  key3
    key4    value

It only matters that the values are aligned for each nesting layer. This should look like

key1    value
key2
  key3          value
  reallyLongKey value

Arrays will have their values be listed underneath a key

arrayKey
  value1
  value2
  value3
  value4

Optiing out

To opt out of this behaviour:

  • Use [].join(",") for Arrays. We have been using doing this for single-lined arrays already, so we should keep this up.

Additional context

Tasks

  1. Implement nesting for dict format
@amydevs amydevs added the development Standard development label Mar 21, 2024
Copy link

linear bot commented Mar 21, 2024

@amydevs
Copy link
Contributor Author

amydevs commented Mar 22, 2024

fixed by #56

@amydevs amydevs closed this as completed Mar 22, 2024
@CMCDragonkai CMCDragonkai added the r&d:polykey:core activity 1 Secret Vault Sharing and Secret History Management label Aug 13, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
development Standard development r&d:polykey:core activity 1 Secret Vault Sharing and Secret History Management
Development

No branches or pull requests

2 participants