Hello,
i’m trying to retrieve json file from wordpress site.
the URL include some parameters (that should say to wordpress only send some specific fields) but it seems that the jsonutility ignore these parameters in the url.
this is the URL string:
https://public-api.wordpress.com/rest/v1.1/sites/somesite.wordpress.com/posts/__**?number=10&fields=title,featured_image&pretty=true**__
the bold\underlined part is ignored because it seems that full json file is sent every time…
this is the code i use:
[System.Serializable]
publicclassGetPostInfo
{
publicPostInfo[]posts;
publicintfound;
publicstaticGetPostInfoCreateFromJSON(stringjsonString)
{
returnJsonUtility.FromJson<GetPostInfo>(jsonString);
}
}
IEnumerator GetInfo() {
WWW www = new WWW(url);
yield return www;
test = GetPostInfo.CreateFromJSON(www.text);
Debug.Log (www.text);
}
debug.log show the full json…
any idea?