do you guys know how to parse an array of json objects but without square brackets
{ "jsonValue1": "val1", "jsonValue2": [1, 1, 2, 2]}
{ "jsonValue1": "val1", "jsonValue2": [1, 1, 2, 2]}
{ "jsonValue1": "val1", "jsonValue2": [1, 1, 2, 2]}
to a List[MyScalaType]
case class MyScalaType(jsonValue1: String, jsonValue2: List[Int])
regular parsing to such List returns: error Malformed message body: Invalid JSON
2
Answers
well, thanks to Luis Miguel Mejía Suárez with "io.circe" %% "circe-fs2" i was able to parse such json
here is short overview. i'm using http4s client
For example you can split the string into lines and transform the string into a valid json string before parsing
Or you can split the string into lines and parse every line into json