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

Make json files json5 #18

Closed
multiplemonomials opened this issue Jun 5, 2022 · 4 comments
Closed

Make json files json5 #18

multiplemonomials opened this issue Jun 5, 2022 · 4 comments
Labels
Usability This makes Mbed harder to use, and needs to be cleaned up.

Comments

@multiplemonomials
Copy link
Collaborator

JSON5 introduces some really nice quality of life improvements for JSON files, including trailing commas (yes!) and the ability to have comments (yaaaaaasssss!). We should change the mbed-tools python package (would probably need to make a fork) to parse JSON files (mbed_app.json, mbed_lib.json, targets.json) with a json5 parser.

@multiplemonomials multiplemonomials added the Usability This makes Mbed harder to use, and needs to be cleaned up. label Jun 5, 2022
@ladislas
Copy link
Member

that sounds great!

What about using yaml instead of json?

yaml translates perfectly to json, and it's not only humane readable, it's also humane writable.

not all things need to be rewritten in yaml, but new things could use it and convert to json for processing (if not used directly which is almost the default anywhere now).

@multiplemonomials
Copy link
Collaborator Author

That could be pretty sweet too. The only issue I could think of is that if we converted targets.json to YAML, it would make it a pain to merge changes from upstream that modify the json version.

@ladislas
Copy link
Member

we can keep targets.json in json and have the other in yaml

at the end of the day, all files are just parsed, it doesn't change much if data is from yaml or json

@multiplemonomials
Copy link
Collaborator Author

Resolved by #194

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Usability This makes Mbed harder to use, and needs to be cleaned up.
Projects
None yet
Development

No branches or pull requests

2 participants