How do you read JSON from server (Wordpress/easy digital downloads)

.

I’m not sure I understand what your problem is. You receive the JSON string. Run it through any of the many free (and good) JSON utilities, and you’ll most probably receive a Dictionary, e.g.

Dictionary <string, string> theJSONDict = myJSONTool.DecodeJSONString(responseFromServer);

and you then Access the license field like any other field in a dict. Note that above is just an example, you’ll have to read the docs to the JSON tool you are using, but they’ll all be similar.

bool isValid = theJSONDict["license"] == "valid"

So, grab yourself a JSON Utility from the asset store, and you’ll be set in 10 minutes :slight_smile:

It includes RESTful API that retrieves data remotely in either XML or JSON format. The API consists of methods for retrieving information about the products, customers, sales, and earnings. Use EDD’s API if you know what you are doing otherwise leave it unmarked. You can read this guide to learn more about JSON and Easy digital downloads plugin, How to Use Easy Digital Downloads WordPress Plugin.