Malformed JSON in Yahoo response

78 Views Asked by At

I am trying to get Yahoo user email by decoding ID Token like here in Ruby. I have a token docoding it with Base64.decode64, parsing JSON and here problem come up. String I am trying to parse to JSON is invalid.

Sorry for this copy-paste have problem with formatting it.

START {"at_hash":"pNgANAsIViDvJ7OCgSk1hw==","sub":"C4SNYQZSHET33BLBTUM3NU2KVP","email_verified":true,"birthdate":"1984","iss":"https://api.login.yahoo.com","profile_images":{"image64":"https://ws.progrss.yahoo.com/progrss/v1/user/C4SNYQZSHET33BLBTUM3NU2KVP/profile/picture [XYNL΋XZ݌KӖTVU [Y^OM SLӕLՔ ٚ[KX\O˚[Y^OLNL N[XY΋XZ݌KӖTVU SLӕLՔ ٚ[KX\Bw6S##"vS3"#&GG3w2&w'726&w'72cW6W"E44UC34$ET$e&f7GW&Pͥȉ艕ULٕ}興Ր艑IYY])DYY9!5)4)9]9!EL4Ռa)]9aE}ѥ͕݅}ذЈ݅兡

END

It looks like the string is cut before its end. Is there any way to get proper JSON? I am using Ruby 2.4.1

0

There are 0 best solutions below