問題タブ [yahoo-oauth]

For questions regarding programming in ECMAScript (JavaScript/JS) and its various dialects/implementations (excluding ActionScript). Note JavaScript is NOT the same as Java! Please include all relevant tags on your question; e.g., [node.js], [jquery], [json], [reactjs], [angular], [ember.js], [vue.js], [typescript], [svelte], etc.

0 投票する
0 に答える
70 参照

json - Yahoo 応答の不正な JSON

ここRubyのようにIDトークンをデコードしてYahooユーザーのメールを取得しようとしています。でトークンをコード化してBase64.decode64、JSON を解析していますが、ここで問題が発生します。JSON に解析しようとしている文字列が無効です。

申し訳ありませんが、このコピーと貼り付けはフォーマットに問題があります。

START {"at_hash":"pNgANAsIViDvJ7OCgSk1hw==","sub":"C4SNYQZSHET33BLBTUM3NU2KVP","email_verified":true,"生年月日":"1984","iss":" https://api.login.yahoo.com "、"profile_images":{"image64": " https://ws.progrss.yahoo.com/progrss/v1/user/C4SNYQZSHET33BLBTUM3NU2KVP/profile/picture O˚[Y^OLNL N[XY΋XŽ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}ѥ͕}ذЈ兡</p>

終わり

糸が途中で切れてしまったようです。適切な JSON を取得する方法はありますか? Ruby 2.4.1を使用しています