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

Feature request - support .yaml files as well as .json files for input #49

Open
oharboe opened this issue Sep 21, 2023 · 2 comments
Open

Comments

@oharboe
Copy link
Contributor

oharboe commented Sep 21, 2023

It would be simple to support both. Would such a PR be considered?

yaml and json are equivalent, but I find yaml can be easier on the eye:

{ "signal": [
        { "name": "clk",  "wave": "P......" },
        { "name": "bus",  "wave": "x.==.=x", "data": ["head", "body", "tail", "data"] },
        { "name": "wire", "wave": "0.1..0." }
]}

vs

signal:
  - name: clk
    wave: P......
  - name: bus
    wave: x.==.=x
    data:
      - head
      - body
      - tail
      - data
  - name: wire
    wave: 0.1..0.
@bavovanachte
Copy link
Owner

Is this supported by the official wavedrom project? If not, would you suggest converting the yaml format to json and then passing it on to wavedrom or wavedrom-py?

@oharboe
Copy link
Contributor Author

oharboe commented Sep 21, 2023

Is this supported by the official wavedrom project?

To my mind wavedrom just uses json as an example, there are any number of ways to represent that datamodel. json, yaml, xml(shudder), TOML(from rust)...

If not, would you suggest converting the yaml format to json and then passing it on to wavedrom or wavedrom-py?

Yes.

However, first I want to try some bigger examples in yaml and see if I still like it :-)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants