diff options
author | Mathias <mathias@decodified.com> | 2015-04-23 12:46:54 +0200 |
---|---|---|
committer | Mathias <mathias@decodified.com> | 2015-04-23 12:46:54 +0200 |
commit | f56576932f98227ef1bd37981a46562d053f8409 (patch) | |
tree | b7359abb4230bc1b0e53f2d9d08eaa2874794039 /src/main/scala | |
parent | 97f92870d0de32807445ff4d81c9be7948fa8de1 (diff) | |
parent | cfae5e1129df9dc0fa6119b82f1e6cc028a4f2ab (diff) | |
download | spray-json-f56576932f98227ef1bd37981a46562d053f8409.tar.gz spray-json-f56576932f98227ef1bd37981a46562d053f8409.tar.bz2 spray-json-f56576932f98227ef1bd37981a46562d053f8409.zip |
Merge pull request #149 from jroper/backwards-compatibility
Reinstated deprecated JsArray and JsObject List based constructors for backwards compatibility
Diffstat (limited to 'src/main/scala')
-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) } /** |