GWT com.google.gwt.json.client.* JSON classes not supporting for jsinterop?
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.
gwt gwt-jsinterop
add a comment |
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.
gwt gwt-jsinterop
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'sGlobal.JSON.parse
instead, which is might simpler (and yet does the same thing) asJSONParser.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
add a comment |
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.
gwt gwt-jsinterop
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.
gwt gwt-jsinterop
gwt gwt-jsinterop
asked Nov 26 '18 at 6:57
ThangarajThangaraj
164
164
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'sGlobal.JSON.parse
instead, which is might simpler (and yet does the same thing) asJSONParser.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
add a comment |
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'sGlobal.JSON.parse
instead, which is might simpler (and yet does the same thing) asJSONParser.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
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
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
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
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
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
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
add a comment |
0
active
oldest
votes
Your Answer
StackExchange.ifUsing("editor", function () {
StackExchange.using("externalEditor", function () {
StackExchange.using("snippets", function () {
StackExchange.snippets.init();
});
});
}, "code-snippets");
StackExchange.ready(function() {
var channelOptions = {
tags: "".split(" "),
id: "1"
};
initTagRenderer("".split(" "), "".split(" "), channelOptions);
StackExchange.using("externalEditor", function() {
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled) {
StackExchange.using("snippets", function() {
createEditor();
});
}
else {
createEditor();
}
});
function createEditor() {
StackExchange.prepareEditor({
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: true,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: 10,
bindNavPrevention: true,
postfix: "",
imageUploader: {
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
},
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
});
}
});
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53476073%2fgwt-com-google-gwt-json-client-json-classes-not-supporting-for-jsinterop%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
0
active
oldest
votes
0
active
oldest
votes
active
oldest
votes
active
oldest
votes
Thanks for contributing an answer to Stack Overflow!
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53476073%2fgwt-com-google-gwt-json-client-json-classes-not-supporting-for-jsinterop%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
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) asJSONParser.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