1

When I try to compile and run the code

JSONValue jv = JSONParser.parseStrict(jsonString);

I got console message as following-

[WARN] Some stale types ([com.mycompany.gwtjs.client.AjaxForm$1, com.mycompany.gwtjs.client.AjaxForm$1$1, com.mycompany.gwtjs.client.AjaxForm]) were not reprocessed as was expected. This is either a compiler bug or a Generator has legitimately stopped creating these types.

The link http://www.gwtproject.org/javadoc/latest/index.html has package which is having the classes i used.

Please anyone has having idea to solve this?

Thanks.

Bill P
  • 3,622
  • 10
  • 20
  • 32
Thangaraj
  • 53
  • 1
  • 7
  • Can you add some detail on what AjaxForm is (and its inner types)? is it created by hand, or generated? If you're using JsInterop, consider using elemental2-dom's `Global.JSON.parse` instead, which is might simpler (and yet does the same thing) as `JSONParser.parseStrict`. – Colin Alworth Nov 26 '18 at 19:58
  • Please post the code in the question. – Colin Alworth Nov 27 '18 at 12:26
  • Thanks for your Solultion that works nicely. `The import com.google.gwt.json.client.JSONArray; import com.google.gwt.json.client.JSONObject; import com.google.gwt.json.client.JSONParser; import com.google.gwt.json.client.JSONString; and more... also works, The problem was in Project.gwt.xml configuration file. I did not inherit the JSON Module. After inheriting it, My earlier code runs. I would like to say how i fix this. I put -strict flag in complier running option. After that the complied asked to inherit the module. Anyway thanks for your suggestion! – Thangaraj Nov 27 '18 at 12:33
  • `code` JSONObject jsonObj = parsed.isObject(); if (jsonObj != null) { for (String key : jsonObj.keySet()) { JSONValue jsonValue = jsonObj.get(key); if(jsonValue.isArray() != null) { GWT.log("Array values are not allowed in a key."); break; } JSONString jsonString = jsonValue.isString(); String strVal = jsonString.stringValue(); if(strVal == null) strVal = ""; requestBuilder.setHeader(key, strVal); } } `code` – Thangaraj Nov 27 '18 at 12:37
  • Can you put the code in the question? And how does this relate to your AjaxForm type (and its two nested inner types)? – Colin Alworth Nov 27 '18 at 14:05

0 Answers0