Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8044575
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 5, 20262026-06-05T05:16:24+00:00 2026-06-05T05:16:24+00:00

We have used JSO for our JSON parsing in GWT client side. Now, we

  • 0

We have used JSO for our JSON parsing in GWT client side. Now, we need to convert our Java objects to JSON string. I just wanted to understand, how we can achieve this? JSO overlay types was used for JSON parsing. Can it also be used to create a JSON request string or do we have to go by some other means?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-05T05:16:25+00:00Added an answer on June 5, 2026 at 5:16 am

    Generating a JSON object in JavaScript is pretty simple. You can do it like this:

    var obj = { "var1": "hello", "var2": "world" };
    

    this will generate a JSON object with two varibles (“var1” and “var2”) with their values (“hello”, “world”).
    The Object can be converted into a String (for sending purposes) with the JSON.stringify(jso); method.

    Generating JSON data from the java code isn’t possible (well not with a usefull result) since all varibles are optimzed to single Strings, so applying this method wouldn’t hava a usefull result (if even possible).

    If you have already a JSO object (generated with something like safeeval). You can edit your varibles there, like this:

    public final native void newValue(String newValue) /*-{
        this.ValueName = newValue;
    }-*/;
    

    If you then want the object as string you have to define the following method in your JSO class:

        public final native String returnAsString () /*-{
        return JSON.stringify(this);
    }-*/;
    

    or use this in you Java class: String s = (new JSONObject(jso)).toString();.

    This way you can edit your original intput data and send the original object back to the server.

    BR

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have used escape function of java script to encode a java script string.
I have used the push notification in my app and I have used our
I have used split function to split the string in javascript. which is as,
I have used microsoft system.security.cryptography to make md5 in c# application but I need
I have used ajax in the code which works perfectly and give me json
I have used this code in my AS3 document class to remove all objects
I have used jquery calendar, and I have used to create event details, now
I have used PHP a lot , and now i want to give back
I have used a query string parameter to redirect from Page 1 to Page
I have used this code (kind of tutorial) at http://code.google.com/p/gwt-examples/wiki/gwt_hmtl5 ... In this code,

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.