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

Refactor serialization #70

Open
atmoos opened this issue Apr 4, 2024 · 1 comment
Open

Refactor serialization #70

atmoos opened this issue Apr 4, 2024 · 1 comment
Assignees
Labels
enhancement New feature or request good first issue Good for newcomers help wanted Extra attention is needed

Comments

@atmoos
Copy link
Owner

atmoos commented Apr 4, 2024

Serialization is broken for inverted quantities. As an elegant solution, we should change the format of non-compound quantities to something resembling:

{
  "length": {
    "value": 4.2,
    "exponent": 1,
    "si": {
      "unit": "m"
    }
  }
}

The key being the added exponent, which simplifies both power measures (m³, etc.) but also inverse measures.

@atmoos atmoos added enhancement New feature or request help wanted Extra attention is needed good first issue Good for newcomers labels Apr 4, 2024
@atmoos atmoos self-assigned this Apr 4, 2024
@atmoos
Copy link
Owner Author

atmoos commented Apr 4, 2024

Consider declaring the exponent optional. Meaning that an absent value means exponent: 1.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request good first issue Good for newcomers help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

1 participant