Azula
Azula

Reputation: 467

Parse String value into AnyContent Value

I have String value

val a: String = "{\"message\": \"value\"}"
val b: String = "<tag>some</tag>"

And I need get from it its values in AnyContent format, not in JSON or XML.

Upvotes: 0

Views: 147

Answers (1)

Sergii Lagutin
Sergii Lagutin

Reputation: 10681

Use play.api.mvc.AnyContentAsText for your purpose

Upvotes: 2

Related Questions