Questions tagged [circe-optics]

5 questions
3
votes
1 answer

Retrieving null values from json using circe-optics

The json I have looks like this: { "cards": [ { "card_id":"1234567890", "card_status":"active", "card_expiration":{ "formatted":"01/20" }, "debit":{ …
Marek M.
  • 3,799
  • 9
  • 43
  • 93
2
votes
0 answers

Decode a nested array with circe-optics

I have JSON like this: "data": { "project": { "activityChildren": [ { "id": 2, "parents": [ { "id": 1 } ] }, ] } } I'd like to decode this…
user355252
1
vote
1 answer

How to decode array containing json with Circe

I have my circe Decoder as shown below. I am confident my Sentiment Decoder works correctly so won't include it below. case class CryptoData(value: String, valueClassification: Sentiment) implicit val decoder: Decoder[CryptoData] =…
Ry2254
  • 859
  • 1
  • 10
  • 19
1
vote
1 answer

Circe-Optics how to specify a path with dash

I am trying to access a field in json with circe-optics. Issue is the field contains a dash: root.TAB-NR.string While if i write root.TAB_NR.string it works, but the field does not exist. Any idea how i can handle this case ?
MaatDeamon
  • 9,532
  • 9
  • 60
  • 127
0
votes
1 answer

How to traverse list of objects with multiple fields with circe optics

I'm looking for a most elegant way to traverse a list of objects with multiple fields in Json with circe optics. Let's say we have this sort of JSON: [ { "key1": "one", "key2": "two" }, { "key1": "three", "key2": "four" …
Konstantin Bodnia
  • 1,372
  • 3
  • 20
  • 43