diff options
author | James Roper <james@jazzy.id.au> | 2015-04-23 13:39:05 +1000 |
---|---|---|
committer | James Roper <james@jazzy.id.au> | 2015-04-23 13:39:05 +1000 |
commit | cfae5e1129df9dc0fa6119b82f1e6cc028a4f2ab (patch) | |
tree | b7359abb4230bc1b0e53f2d9d08eaa2874794039 /src/main/scala/spray | |
parent | 97f92870d0de32807445ff4d81c9be7948fa8de1 (diff) | |
download | spray-json-cfae5e1129df9dc0fa6119b82f1e6cc028a4f2ab.tar.gz spray-json-cfae5e1129df9dc0fa6119b82f1e6cc028a4f2ab.tar.bz2 spray-json-cfae5e1129df9dc0fa6119b82f1e6cc028a4f2ab.zip |
Reinstated deprecated JsArray and JsObject List based constructors for backwards compatibility
Diffstat (limited to 'src/main/scala/spray')
-rw-r--r-- | src/main/scala/spray/json/JsValue.scala | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/src/main/scala/spray/json/JsValue.scala b/src/main/scala/spray/json/JsValue.scala index bc2889d..1f9bb05 100644 --- a/src/main/scala/spray/json/JsValue.scala +++ b/src/main/scala/spray/json/JsValue.scala @@ -53,14 +53,21 @@ case class JsObject(fields: Map[String, JsValue]) extends JsValue { } object JsObject { def apply(members: JsField*) = new JsObject(Map(members: _*)) + @deprecated("Use JsObject(JsValue*) instead", "1.3.0") + def apply(members: List[JsField]) = new JsObject(Map(members: _*)) } /** * A JSON array. */ -case class JsArray(elements: Vector[JsValue]) extends JsValue +case class JsArray(elements: Vector[JsValue]) extends JsValue { + @deprecated("Use JsArray(Vector[JsValue]) instead", "1.3.0") + def this(elements: List[JsValue]) = this(elements.toVector) +} object JsArray { def apply(elements: JsValue*) = new JsArray(elements.toVector) + @deprecated("Use JsArray(Vector[JsValue]) instead", "1.3.0") + def apply(elements: List[JsValue]) = new JsArray(elements.toVector) } /** |