adefor
adefor

Reputation: 299

Spray Json Deserialize Root Sequence

I want to deserialize a Json string which is a sequence at the root node. For example,

[{"name":"Bob", "age":26}, {"name":"Ted", "age":24}]

How do I use spray-json to do that?

Upvotes: 1

Views: 122

Answers (1)

adefor
adefor

Reputation: 299

I asked my unmarshaller to unmarshal the string as a Seq like -

unmarshal[Seq[Person]]

and it worked.

Upvotes: 0

Related Questions