Ubidots Community

Error using Java APIs, they're not working properly

Hi, today I get this error while trying to retrieve the variables from my device; the error occurs when executing this line:

Variable[] allDataSourceVariables = dataSource.getVariables();

And the error is:

Exception in thread “main” com.google.gson.JsonSyntaxException: java.lang.IllegalStateException: Expected BEGIN_ARRAY but was BEGIN_OBJECT at line 1 column 2

My code worked a week ago, now it doesn’t work anymore.

The same commands in Python work.