Loading ...
Sorry, an error occurred while loading the content.

Re: [json] JSON to java

Expand Messages
  • Inderjeet Singh
    Checkout Google Gson library (Apache license) that we authored: http://code.google.com/p/google-gson/ There are other Java libraries linked at json.org as
    Message 1 of 6 , Jul 15 1:55 PM
    • 0 Attachment
      Checkout Google Gson library (Apache license) that we authored:

      http://code.google.com/p/google-gson/

      There are other Java libraries linked at json.org as well.

      Inder


      On Wed, Jul 15, 2009 at 1:17 PM, dey_nibedita<dey_nibedita@...> wrote:
      >
      >
      > What is the best way to convert JSON value to java object so that it can be
      > sent to server? It needs to be free / open source.
      >
      >
    • Tatu Saloranta
      ... Just to make sure: if you already have JSON content, why would you need to convert it to Java object? Couldn t you just send it as is? But assuming this
      Message 2 of 6 , Jul 15 8:51 PM
      • 0 Attachment
        On Wed, Jul 15, 2009 at 1:17 PM, dey_nibedita<dey_nibedita@...> wrote:
        > What is the best way to convert JSON value to java object so that it can be sent to server? It needs to be free / open source.

        Just to make sure: if you already have JSON content, why would you
        need to convert it to Java object?
        Couldn't you just send it as is?

        But assuming this makes sense, in addition to google-gson which was
        mentioned and can do this, some (not all) of libs listed at json.org
        can do data binding:

        * Jackson (http://wiki.fasterxml.com/JacksonInFiveMinutes)
        * Json-tools (http://developer.berlios.de/projects/jsontools/)

        most other alternatives only provide either tree-based access, or
        mapping to 'simple' java types (List, Maps, Booleans, Numbers,
        Strings). Which are of course java objects, strictly speaking, but I
        assume you would want custom beans etc, sort "real" objects.

        -+ Tatu +-
      • Arthur Blake
        http://jabsorb.org is both a java json codec and a full json-rpc framework. It is light, simple, mature, fast and awesome!... but of course I m a little
        Message 3 of 6 , Jul 16 6:03 AM
        • 0 Attachment
          http://jabsorb.org is both a java<-->json codec and a full json-rpc
          framework. It is light, simple, mature, fast and awesome!... but of course
          I'm a little biased :)

          On Wed, Jul 15, 2009 at 11:51 PM, Tatu Saloranta <tsaloranta@...>wrote:

          >
          >
          > On Wed, Jul 15, 2009 at 1:17 PM, dey_nibedita<dey_nibedita@...<dey_nibedita%40yahoo.com>>
          > wrote:
          > > What is the best way to convert JSON value to java object so that it can
          > be sent to server? It needs to be free / open source.
          >
          > Just to make sure: if you already have JSON content, why would you
          > need to convert it to Java object?
          > Couldn't you just send it as is?
          >
          > But assuming this makes sense, in addition to google-gson which was
          > mentioned and can do this, some (not all) of libs listed at json.org
          > can do data binding:
          >
          > * Jackson (http://wiki.fasterxml.com/JacksonInFiveMinutes)
          > * Json-tools (http://developer.berlios.de/projects/jsontools/)
          >
          > most other alternatives only provide either tree-based access, or
          > mapping to 'simple' java types (List, Maps, Booleans, Numbers,
          > Strings). Which are of course java objects, strictly speaking, but I
          > assume you would want custom beans etc, sort "real" objects.
          >
          > -+ Tatu +-
          >
          >
          >


          [Non-text portions of this message have been removed]
        • Claudio D'angelo
          See JAJB (http://jajb.sourceforge.net/) too. Convert json to java using annotation and/or XML and/or dynamic binding. ... -- __________________________________
          Message 4 of 6 , Jul 20 12:23 AM
          • 0 Attachment
            See JAJB (http://jajb.sourceforge.net/) too. Convert json to java using
            annotation and/or XML and/or dynamic binding.

            Tatu Saloranta ha scritto:
            >
            >
            > On Wed, Jul 15, 2009 at 1:17 PM, dey_nibedita<dey_nibedita@...
            > <mailto:dey_nibedita%40yahoo.com>> wrote:
            > > What is the best way to convert JSON value to java object so that it
            > can be sent to server? It needs to be free / open source.
            >
            > Just to make sure: if you already have JSON content, why would you
            > need to convert it to Java object?
            > Couldn't you just send it as is?
            >
            > But assuming this makes sense, in addition to google-gson which was
            > mentioned and can do this, some (not all) of libs listed at json.org
            > can do data binding:
            >
            > * Jackson (http://wiki.fasterxml.com/JacksonInFiveMinutes
            > <http://wiki.fasterxml.com/JacksonInFiveMinutes>)
            > * Json-tools (http://developer.berlios.de/projects/jsontools/
            > <http://developer.berlios.de/projects/jsontools/>)
            >
            > most other alternatives only provide either tree-based access, or
            > mapping to 'simple' java types (List, Maps, Booleans, Numbers,
            > Strings). Which are of course java objects, strictly speaking, but I
            > assume you would want custom beans etc, sort "real" objects.
            >
            > -+ Tatu +-
            >
            >

            --
            __________________________________

            Claudio D'Angelo
            Programmatore
            Direzione Sviluppo Area di Staff Tecnologie

            Lombardia Informatica S.p.A.
            Via Don G. Minzoni, 24
            20158 Milano ITALY
            www.lispa.it

            Mail: claudio.dangelo@...
            Office: +39 02 39331 485
            Fax: +39 02 39331 250
            __________________________________

            Le informazioni contenute in questo messaggio e ogni documento o file ad
            esso allegato sono riservati e confidenziali. Il loro utilizzo è
            consentito esclusivamente al destinatario del messaggio o a diversa
            persona da questo autorizzata, per le finalità indicate nel messaggio
            medesimo. Qualora Lei non fosse la persona cui il presente messaggio è
            destinato, La invitiamo a eliminarlo dal Suo Sistema e a distruggere le
            varie copie o stampe, dandocene gentilmente comunicazione. Ogni utilizzo
            improprio è contrario ai principi del D.Lgs. 196/03 e alla legislazione
            europea (Direttiva 2002/58/CE). Lombardia Informatica S.p.A. opera in
            conformità al D.Lgs. 196/2003 citato. Per qualsiasi informazione a
            riguardo si prega di contattare la nostra Società al seguente indirizzo
            e-mail: info@...

            The information contained in this message, as well as any attached
            file(s), is private and confidential and is only intended for the person
            to whom it is addressed. If the reader of this message is not the
            intended recipient or the employee or agent responsible for delivering
            the message to the intended recipient, or you have received this
            communication in error, please be aware that any dissemination,
            distribution or duplication is strictly prohibited, and may be illegal.
            Please notify us immediately and delete all copies from your mailbox and
            other archives. Thank you.
          • Tyler Close
            The Waterken Server includes a library for JSON Java object conversion. There s also a simple wrapper class that facilitates using JSON
            Message 5 of 6 , Jul 20 8:48 AM
            • 0 Attachment
              The Waterken Server <waterken.sf.net> includes a library for JSON <=>
              Java object conversion. There's also a simple wrapper class that
              facilitates using JSON configuration files, see:

              http://waterken.sourceforge.net/javadoc/org/waterken/syntax/config/Config.html

              --Tyler

              On Wed, Jul 15, 2009 at 1:17 PM, dey_nibedita<dey_nibedita@...> wrote:
              >
              >
              > What is the best way to convert JSON value to java object so that it can be
              > sent to server? It needs to be free / open source.
              >
              >



              --
              "Waterken News: Capability security on the Web"
              http://waterken.sourceforge.net/recent.html
            Your message has been successfully submitted and would be delivered to recipients shortly.