yamlesque-spray-json


License

License

Categories

Categories

JSON Data CRaSH General Purpose Libraries Utility
GroupId

GroupId

io.crashbox
ArtifactId

ArtifactId

yamlesque-spray-json_2.12
Last Version

Last Version

0.1.1
Release Date

Release Date

Type

Type

jar
Description

Description

yamlesque-spray-json
yamlesque-spray-json
Project URL

Project URL

https://github.com/jodersky/yamlesque
Project Organization

Project Organization

io.crashbox
Source Code Management

Source Code Management

https://github.com/jodersky/yamlesque

Download yamlesque-spray-json_2.12

How to add to project

<!-- https://jarcasting.com/artifacts/io.crashbox/yamlesque-spray-json_2.12/ -->
<dependency>
    <groupId>io.crashbox</groupId>
    <artifactId>yamlesque-spray-json_2.12</artifactId>
    <version>0.1.1</version>
</dependency>
// https://jarcasting.com/artifacts/io.crashbox/yamlesque-spray-json_2.12/
implementation 'io.crashbox:yamlesque-spray-json_2.12:0.1.1'
// https://jarcasting.com/artifacts/io.crashbox/yamlesque-spray-json_2.12/
implementation ("io.crashbox:yamlesque-spray-json_2.12:0.1.1")
'io.crashbox:yamlesque-spray-json_2.12:jar:0.1.1'
<dependency org="io.crashbox" name="yamlesque-spray-json_2.12" rev="0.1.1">
  <artifact name="yamlesque-spray-json_2.12" type="jar" />
</dependency>
@Grapes(
@Grab(group='io.crashbox', module='yamlesque-spray-json_2.12', version='0.1.1')
)
libraryDependencies += "io.crashbox" % "yamlesque-spray-json_2.12" % "0.1.1"
[io.crashbox/yamlesque-spray-json_2.12 "0.1.1"]

Dependencies

compile (3)

Group / Artifact Type Version
org.scala-lang : scala-library jar 2.12.4
io.crashbox : yamlesque_2.12 jar 0.1.1
io.spray : spray-json_2.12 jar 1.3.4

test (1)

Group / Artifact Type Version
com.lihaoyi : utest_2.12 jar 0.6.4

Project Modules

There are no modules declared in this project.

Build Status

yamlesque

Pure Scala YAML parsing.

As the name suggests, "yam-el-esque" is a Scala implementation of the most frequently used YAML features. It takes inspiration from Spray-JSON and aims to provide an idiomatic API that is cross-platform and has a minimal set of dependencies.

Getting Started

Include yamlesque into a project. In sbt, this can be done with:

libraryDependencies += "io.crashbox" %% "yamlesque" % "<latest_tag>"

Parse some YAML

import yamlesque._

val text = s"""|name: yamlesque
               |description: a YAML library for scala
               |authors:
               |  - name: Jakob Odersky
               |    id: jodersky
               |  - name: Another
               |""".stripMargin

// parse yaml to a type safe representation
val yaml = text.parseYaml

Integration with Spray-JSON

TODO

Integration with Akka-HTTP

TODO

YAML Conformance

Yamlesque does not strictly implement all features as defined in YAML 1.2, however support should be sufficient for most regular documents. Pull requests with additional feature implementations are always welcome!

The current feature restrictions are:

  • always assumes utf-8 is used
  • anchors and references are not supported
  • tags are not supported
  • flow-styles (aka inline JSON) aren't supported
  • only single-line literals are allowed (no > or | blocks)

Versions

Version
0.1.1
0.1.0