title: Create JSON object and convert it to String in Java
body: <p>I need to send a quite long JSON header through an http post. In Python was like this:</p>
  
  <pre><code>    self.body_header = {
                  "client": self.client_name,
                  "clientRevision": self.client_version,
                  "uuid": str(uuid.uuid4()),
                  "session": self.get_sessionid()}
  
      self.body = {
                  "header": self.body_header,
                  "country": {"IPR":"1021", "ID":"223", "CC1":"0", "CC2":"0", "CC3":"0", "CC4":"2147483648"},
                  "privacy": 1}
  </code></pre>
  
  <p>I need to do something similar in Java, ie, create somehow a JSON struct, convert it to a String and send it via http.</p>
  
  <p>The question is, how can I achieve that easily? Any useful libraries? I know how to send it, but not how to build it and then create a String.</p>
  
  <p>Thank you all.</p>