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

Add API for extracting data from nodes #67

Open
kpodsiad opened this issue Sep 8, 2021 Discussed in #56 · 4 comments
Open

Add API for extracting data from nodes #67

kpodsiad opened this issue Sep 8, 2021 Discussed in #56 · 4 comments
Labels
feature New feature or request
Milestone

Comments

@kpodsiad
Copy link
Contributor

kpodsiad commented Sep 8, 2021

Discussed in #56

Originally posted by pikinier20 August 19, 2021

  • Add an API to retrieve a value of a field with desired name

Examples:

case class Example(a: Int, b: String)
val yamlNode: Node = Node.MappingNode(
Node.KeyValueNode(Node.ScalarNode("a"), Node.ScalarNode(2)),
Node.KeyValueNode(Node.ScalarNode("b"), Node.ScalarNode("asd")
)
for {
a <- yamlNode.get("a").as[Int]
b <- yamlNode.get("b").as[String]
} yield Example(a, b)
@kpodsiad kpodsiad added the feature New feature or request label Sep 8, 2021
@kpodsiad kpodsiad added this to the M3 milestone Sep 8, 2021
@brianmowen
Copy link

@kpodsiad I'd like to use this library at work and want to help maintain and keep it up to date. Is this ticket a good place to start? Are you open to contributions?

@kpodsiad
Copy link
Contributor Author

kpodsiad commented Nov 4, 2022

Are you open to contributions?

Yes, you're more than welcome to contribute! One disclaimer though, this project is bit stale, I think there's nothing surprising in saying that there are just better things to focus on after work than YAML. Most probably some parts of the code could be written in a better way and might be unclear as there isn't many documentation. That being said, have you considered using https://github.com/circe/circe-yaml? If you expect solid piece of software this might be a better idea. It uses SnakaYaml to parse yaml files.

However, if I didn't scare you off and you're still interested, I can try to find some time to work on this library and help you with it.

@brianmowen
Copy link

However, if I didn't scare you off and you're still interested, I can try to find some time to work on this library and help you with it.

Thanks for your response! I'm still interested in helping out. I've used circe-yaml in the past but I do think there's a market for dependency free yaml library in scala. Is there a discord or anything where we could talk about things I could help out with?

@lbialy
Copy link
Contributor

lbialy commented Jul 21, 2024

@brianmowen still interested in this issue? 🤔

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

No branches or pull requests

3 participants