https://github.com/ItsMeijers/SCAML
A purely functional Scala library for the YAML markup language
https://github.com/ItsMeijers/SCAML
functional jvm native scala yaml yaml-parser
Last synced: over 1 year ago
JSON representation
A purely functional Scala library for the YAML markup language
- Host: GitHub
- URL: https://github.com/ItsMeijers/SCAML
- Owner: ItsMeijers
- Created: 2017-11-21T11:26:01.000Z (over 8 years ago)
- Default Branch: master
- Last Pushed: 2018-08-22T09:52:00.000Z (almost 8 years ago)
- Last Synced: 2024-10-24T15:39:05.093Z (over 1 year ago)
- Topics: functional, jvm, native, scala, yaml, yaml-parser
- Language: Scala
- Homepage:
- Size: 23.4 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# SCAML - A purely functional Scala library for the YAML markup language
**_Note that this project is currently under heavy development and not near production ready._**
## Overview
### Features
* Pure YAML processor
* Generic derivation (TODO)
* Lenses integration (TODO)
* Speed (TODO)
## Quick-start
To add SCAML as a dependency to your Scala project:
```
sbt settings
```
Usage examples:
Example YAML:
```YAML
name: Thomas
address:
street: Code Street
number: 777
addon: A
postalCode:
number: 20
addon: ab
age: 200
```
Example Scala:
```scala
case class PostalCode(number: Int, addon: Option[String])
case class Address(street: String, number: Int, addon: Option[String], postalCode: PostalCode)
case class Person(age: Int, name: String, address: Address)
val file: String = File("example.json")
val person: Either[YamlError, Person] = YAML.read[Person](file)
println(Person.get)
val yamlObject: YamlObject = Yaml.write(person)
println(yamlObject)
```
## Documentation
Link to full documentation and usage guide.
## Contributing
All contributions, suggestions and feedback is welcome!
## License
Add license!