Problem with JSON in java

Topic: Problem with JSON in java

I have a problem with a JSON format this is my code:

public void Datos(String id){
        long idLg = Long.parseLong(id);
        long flagLg = 8389633;
        JsonObject recibejson = new JsonObject();
        recibejson.addProperty("id", idLg);
        recibejson.addProperty("flags", flagLg);
        //recibejson = recibejson+"&sid=026cc36f88a8c46099a3ff3e48eace36";
        //System.out.println("JSON: " + recibejson + "&sid="+);
        //return recibejson.toString();
        RemoteHttpClient remoteHttpClient = RemoteHttpClient.getInstance();
        remoteHttpClient.remoteCall("core/search_item", recibejson, new ResponseHandler(){
            //remoteHttpClient.remoteCall(url, new ResponseHandler(){
            public void onSuccess(String response)
                System.out.println("Esto es lo que recibe");
            public void onFailure(int errorCode, Throwable throwableError) {
                super.onFailure(errorCode, throwableError);
                // search item failed, print error


The problem is that as I can attach the "SID" so that I get back the answer according to this example:


Suggest or coments please.


Problem with JSON in java

Re: Problem with JSON in java

You do not need to add the SID parameter, Java SDK will do it without any parameters. You can find an example of "searchItems" usage here.

Mobile Development

Problem with JSON in java

Re: Problem with JSON in java


wialon web services move to json ecma 404, You should check that standard, and see if your version of java is generating that same standard


Problem with JSON in java

(edited by Denisse 10/01/2017 18:48:38)

Re: Problem with JSON in java

kopa  Yes thank you for this information, because How can I get the values of the profile field of the unit, as well as its position and parameters of the unit ?, try to add the libraries but does not show me the information or not if it is coded.

Thank you for this information.

Some idea o suggest for this opinion.