Fields wrongly serialized
Closed this issue · 0 comments
satabin commented
When saving bulks documents containing lists of strings, they are not correctly serialized. Strings are not escaped. For example saving bulk documents described as follows:
case class Doc(_id: String, value: List[String]) extends IdRev
val db = ...
val docs =
List(
Doc("id1", List("string1", "string2")),
Doc("id2", List("string1", "string2"))
)
db.saveDocs(docs)
docs
gets serialized as
[
{
"_id": "id1",
"value": [ "\"string1\"", "\"string2\"" ]
},
{
"_id": "id2",
"value": [ "\"string1\"", "\"string2\"" ]
}
]
but should be serialized as:
[
{
"_id": "id1",
"value": [ "string1", "string2" ]
},
{
"_id": "id2",
"value": [ "string1", "string2" ]
}
]