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

BTreeMap<String, Value> for add_map #81

Closed
rawkode opened this issue Aug 27, 2021 · 5 comments
Closed

BTreeMap<String, Value> for add_map #81

rawkode opened this issue Aug 27, 2021 · 5 comments

Comments

@rawkode
Copy link

rawkode commented Aug 27, 2021

I'm trying to use koto and struggling to get a koto instance with values / contexts from a BTreeMap<String, serde_yaml::Value>

I don't suppose anyone has done this and could provide an example?

Thanks

@irh
Copy link
Contributor

irh commented Aug 28, 2021

Hi @rawkode, happy to hear you're trying out Koto! Have you seen the JSON / TOML examples in libs/? They both make use of koto_serialize to convert serde values. I haven't tried it but I've been assuming that a similar approach would also work for YAML. If this is what you're trying, what problems are you running in to?

@irh
Copy link
Contributor

irh commented Aug 30, 2021

I added a koto_yaml lib in #83, and the yaml_value_to_koto_value function might be useful to you.

@rawkode
Copy link
Author

rawkode commented Aug 30, 2021

Damn! I was literally just sitting down to try and work this out and the email notification popped up with this.

Checking it out and I'll let you know how I get on. Thanks so much!

I plan to replace the usage of expr in Comtrya with this; so I'm very excited 😆

@irh
Copy link
Contributor

irh commented Aug 30, 2021

Great, looking forward to hearing how it goes =)

@rawkode
Copy link
Author

rawkode commented Sep 8, 2021

Perfect 😀

Thank you so much!

@rawkode rawkode closed this as completed Sep 8, 2021
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