Skip to content

Commit

Permalink
Release v0.3.1
Browse files Browse the repository at this point in the history
  • Loading branch information
OlegIlyenko committed May 1, 2016
1 parent 5a82722 commit eb81615
Show file tree
Hide file tree
Showing 4 changed files with 21 additions and 10 deletions.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
## v0.2.1 (2016-05-01)

* Updated to sangria-marshalling-api v0.2.1

## v0.3.0 (2016-03-24)

* Updated to sangria-marshalling-api v0.2.0
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
SBT Configuration:

```scala
libraryDependencies += "org.sangria-graphql" %% "sangria-spray-json" % "0.3.0"
libraryDependencies += "org.sangria-graphql" %% "sangria-spray-json" % "0.3.1"
```

## License
Expand Down
6 changes: 3 additions & 3 deletions build.sbt
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
name := "sangria-spray-json"
organization := "org.sangria-graphql"
version := "0.3.1-SNAPSHOT"
version := "0.3.1"

description := "Sangria spray-json marshalling"
homepage := Some(url("http://sangria-graphql.org"))
Expand All @@ -10,10 +10,10 @@ scalaVersion := "2.11.8"
scalacOptions ++= Seq("-deprecation", "-feature")

libraryDependencies ++= Seq(
"org.sangria-graphql" %% "sangria-marshalling-api" % "0.2.0",
"org.sangria-graphql" %% "sangria-marshalling-api" % "0.2.1",
"io.spray" %% "spray-json" % "1.3.2",

"org.sangria-graphql" %% "sangria-marshalling-testkit" % "0.2.0" % "test",
"org.sangria-graphql" %% "sangria-marshalling-testkit" % "0.2.1" % "test",
"org.scalatest" %% "scalatest" % "2.2.6" % "test"
)

Expand Down
19 changes: 13 additions & 6 deletions src/main/scala/sangria/marshalling/sprayJson.scala
Original file line number Diff line number Diff line change
Expand Up @@ -22,12 +22,19 @@ object sprayJson extends SprayJsonSupportLowPrioImplicits {
case None nullNode
}

def stringNode(value: String) = JsString(value)
def booleanNode(value: Boolean) = JsBoolean(value)
def floatNode(value: Double) = JsNumber(value)
def intNode(value: Int) = JsNumber(value)
def bigIntNode(value: BigInt) = JsNumber(value)
def bigDecimalNode(value: BigDecimal) = JsNumber(value)
def scalarNode(value: Any, typeName: String, info: Set[ScalarValueInfo]) = value match {
case v: String JsString(v)
case v: Boolean JsBoolean(v)
case v: Int JsNumber(v)
case v: Long JsNumber(v)
case v: Float JsNumber(v)
case v: Double JsNumber(v)
case v: BigInt JsNumber(v)
case v: BigDecimal JsNumber(v)
case v throw new IllegalArgumentException("Unsupported scalar value: " + v)
}

def enumNode(value: String, typeName: String) = JsString(value)

def nullNode = JsNull

Expand Down

0 comments on commit eb81615

Please sign in to comment.