VictorAlbertos / RxSocialConnect-Android

OAuth RxJava extension for Android.
Apache License 2.0
257 stars 22 forks source link

JSON parsing #25

Closed mmateom closed 7 years ago

mmateom commented 7 years ago

Sorry if this is a dumb question, it's my first time trying this and I can't solve it. I'm really new to Oauth2 and JSON so I'm using RxSocialConnect-Android library to simplify the OAuth2 process that requires Fitbit and to get some weight data. I followed this example. The response I get is this one:

{ weight=[ { bmi=21.0, date=2016-12-09, fat=14.059000015258789, logId=1.xxxxxxx, source=Aria, time=11:58:24, weight=68.0 }, { bmi=21.83, date=2016-12-14, logId=1.xxxxxxxx, source=Aria, time=14:31:39, weight=70.7 } ] }

I want to get just the "weight" and "date" parameters inside weight array. I have tried creating a pojo class following this example and replacing it by the "Object" field in my interface:

interface FitbitApiRest { String URL_BASE = "https://api.fitbit.com"; @GET("myrequest.json") Observable<Object>getData(); }

But I still can't get the parameters I want, just got something like "[com.myPackage.MyPojo@xxxxx",com.myPackage.MyPojo@yyyyy]"

What am I doing wrong?