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

Can we read YAML directly from XML file. #680

Open
SaranshGupta786 opened this issue Oct 25, 2023 · 2 comments
Open

Can we read YAML directly from XML file. #680

SaranshGupta786 opened this issue Oct 25, 2023 · 2 comments

Comments

@SaranshGupta786
Copy link

I want to read params, directly from yaml file to set keys in blackboard, and later use it in cpp code. I tried reading yaml file directly from cpp file, but i feel, to be able to read directly from yaml file into xml will give greater control over flow of code.

@facontidavide
Copy link
Collaborator

That is possible, I guess.
You can contribute with a PR to suggest this change

@mnumanuyar
Copy link

for clarification; do you only wish a support for "Mapping Scalars to Scalars" kind of implementation or is there ssomething else also?

for example fallowing is easy to understand howit should look like in blackboard:

hr:  65    # Home runs
avg: 0.278 # Batting average
rbi: 147   # Runs Batted In
american:
- Boston Red Sox
- Detroit Tigers
- New York Yankees

However fallowing 2 examples might not be so straightforward:

-
  name: Mark McGwire
  hr:   65
  avg:  0.278
-
  name: Sammy Sosa
  hr:   63
  avg:  0.288
Mark McGwire: {hr: 65, avg: 0.278}
Sammy Sosa: {
    hr: 63,
    avg: 0.288,
 }

PS: these examples (wtih little edits) are from https://yaml.org/spec/1.2.2/

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

3 participants