{"action":"created","issue":{"url":"https://api.github.com/repos/SUSE/saltstack-netapi-client-java/issues/81","labels_url":"https://api.github.com/repos/SUSE/saltstack-netapi-client-java/issues/81/labels{/name}","comments_url":"https://api.github.com/repos/SUSE/saltstack-netapi-client-java/issues/81/comments","events_url":"https://api.github.com/repos/SUSE/saltstack-netapi-client-java/issues/81/events","html_url":"https://github.com/SUSE/saltstack-netapi-client-java/issues/81","id":92358892,"number":81,"title":"getJobs Exception","user":{"login":"0312birdzhang","id":1762041,"avatar_url":"https://avatars.githubusercontent.com/u/1762041?v=3","gravatar_id":"","url":"https://api.github.com/users/0312birdzhang","html_url":"https://github.com/0312birdzhang","followers_url":"https://api.github.com/users/0312birdzhang/followers","following_url":"https://api.github.com/users/0312birdzhang/following{/other_user}","gists_url":"https://api.github.com/users/0312birdzhang/gists{/gist_id}","starred_url":"https://api.github.com/users/0312birdzhang/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/0312birdzhang/subscriptions","organizations_url":"https://api.github.com/users/0312birdzhang/orgs","repos_url":"https://api.github.com/users/0312birdzhang/repos","events_url":"https://api.github.com/users/0312birdzhang/events{/privacy}","received_events_url":"https://api.github.com/users/0312birdzhang/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":7,"created_at":"2015-07-01T11:36:41Z","updated_at":"2015-07-02T07:51:58Z","closed_at":null,"body":"My code is:\r\n```java\r\nURI uri = URI.create(\"http://127.0.0.1:8000\");\r\nSaltStackClient client = new SaltStackClient(uri);\r\n try {\r\n    Token token = client.login(\"username\", \"passoword\", PAM);\r\n    ScheduledJob job = client.startCommand(\"*\", \"cmd.run\", param, kwargs);\r\n    System.out.println(job.getMinions());\r\n    Map<String, Job> jobs = client.getJobs(); \r\n    ......\r\n```\r\nExcetion happened when executed to  <code>Map<String, Job> jobs = client.getJobs(); </code>\r\nI can get minions and run commands,but getjobs not work.\r\nThe exception message:\r\n```\r\nException in thread \"main\" com.google.gson.JsonSyntaxException: java.lang.IllegalStateException: Expected a string but was BEGIN_ARRAY at line 1 column 125 path $.return[0]..Target-type\r\n\tat com.google.gson.internal.bind.ReflectiveTypeAdapterFactory$Adapter.read(ReflectiveTypeAdapterFactory.java:200)\r\n\tat com.google.gson.internal.bind.TypeAdapterRuntimeTypeWrapper.read(TypeAdapterRuntimeTypeWrapper.java:40)\r\n\tat com.google.gson.internal.bind.MapTypeAdapterFactory$Adapter.read(MapTypeAdapterFactory.java:187)\r\n\tat com.google.gson.internal.bind.MapTypeAdapterFactory$Adapter.read(MapTypeAdapterFactory.java:145)\r\n\tat com.google.gson.internal.bind.TypeAdapterRuntimeTypeWrapper.read(TypeAdapterRuntimeTypeWrapper.java:40)\r\n\tat com.google.gson.internal.bind.CollectionTypeAdapterFactory$Adapter.read(CollectionTypeAdapterFactory.java:81)\r\n\tat com.google.gson.internal.bind.CollectionTypeAdapterFactory$Adapter.read(CollectionTypeAdapterFactory.java:60)\r\n\tat com.google.gson.internal.bind.ReflectiveTypeAdapterFactory$1.read(ReflectiveTypeAdapterFactory.java:103)\r\n\tat com.google.gson.internal.bind.ReflectiveTypeAdapterFactory$Adapter.read(ReflectiveTypeAdapterFactory.java:196)\r\n\tat com.google.gson.Gson.fromJson(Gson.java:810)\r\n\tat com.google.gson.Gson.fromJson(Gson.java:775)\r\n\tat com.suse.saltstack.netapi.parser.JsonParser.parse(JsonParser.java:91)\r\n\tat com.suse.saltstack.netapi.client.impl.HttpClientConnection.executeRequest(HttpClientConnection.java:193)\r\n\tat com.suse.saltstack.netapi.client.impl.HttpClientConnection.request(HttpClientConnection.java:85)\r\n\tat com.suse.saltstack.netapi.client.impl.HttpClientConnection.getResult(HttpClientConnection.java:73)\r\n\tat com.suse.saltstack.netapi.client.SaltStackClient.getJobs(SaltStackClient.java:375)\r\n\tat com.cmdb.cron.CheckSaltClient.main(CheckSaltClient.java:63)\r\nCaused by: java.lang.IllegalStateException: Expected a string but was BEGIN_ARRAY at line 1 column 125 path $.return[0]..Target-type\r\n\tat com.google.gson.stream.JsonReader.nextString(JsonReader.java:837)\r\n\tat com.google.gson.internal.bind.TypeAdapters$13.read(TypeAdapters.java:358)\r\n\tat com.google.gson.internal.bind.TypeAdapters$13.read(TypeAdapters.java:346)\r\n\tat com.google.gson.internal.bind.ReflectiveTypeAdapterFactory$1.read(ReflectiveTypeAdapterFactory.java:103)\r\n\tat com.google.gson.internal.bind.ReflectiveTypeAdapterFactory$Adapter.read(ReflectiveTypeAdapterFactory.java:196)\r\n\t... 16 more\r\n```"},"comment":{"url":"https://api.github.com/repos/SUSE/saltstack-netapi-client-java/issues/comments/117947798","html_url":"https://github.com/SUSE/saltstack-netapi-client-java/issues/81#issuecomment-117947798","issue_url":"https://api.github.com/repos/SUSE/saltstack-netapi-client-java/issues/81","id":117947798,"user":{"login":"whiteinge","id":91293,"avatar_url":"https://avatars.githubusercontent.com/u/91293?v=3","gravatar_id":"","url":"https://api.github.com/users/whiteinge","html_url":"https://github.com/whiteinge","followers_url":"https://api.github.com/users/whiteinge/followers","following_url":"https://api.github.com/users/whiteinge/following{/other_user}","gists_url":"https://api.github.com/users/whiteinge/gists{/gist_id}","starred_url":"https://api.github.com/users/whiteinge/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/whiteinge/subscriptions","organizations_url":"https://api.github.com/users/whiteinge/orgs","repos_url":"https://api.github.com/users/whiteinge/repos","events_url":"https://api.github.com/users/whiteinge/events{/privacy}","received_events_url":"https://api.github.com/users/whiteinge/received_events","type":"User","site_admin":false},"created_at":"2015-07-02T07:51:58Z","updated_at":"2015-07-02T07:51:58Z","body":"Yikes. Yeah, if the JSON output is different between 2014.7 and 2015.5 that is definitely a regression and a bug."}}