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

JSON to Java bean

Expand Messages
  • gtcul
    Hi All, I m sure this has been asked before but I cannot find it here, so here is my question Is there a simple way to convert/deserialize and JSON object into
    Message 1 of 2 , Mar 28, 2011
    • 0 Attachment
      Hi All,

      I'm sure this has been asked before but I cannot find it here, so here is my question

      Is there a simple way to convert/deserialize and JSON object into a Java bean? There is the toBean() method but that looks like it is only for primitives. I know you can convert a Java bean to a JSON object.

      GSON has something I could use but I don't want to use GSON.

      Any help or thoughts would be great.

      Travis...
    • Tatu Saloranta
      On Mon, Mar 28, 2011 at 2:15 PM, gtcul ... You are better of using a package that does data binding, such as Jackson or GSON. -+ Tatu +-
      Message 2 of 2 , Mar 28, 2011
      • 0 Attachment
        On Mon, Mar 28, 2011 at 2:15 PM, gtcul
        <travis.culbreth@...> wrote:
        > Hi All,
        >
        > I'm sure this has been asked before but I cannot find it here, so here is my question
        >
        > Is there a simple way to convert/deserialize and JSON object into a Java bean?  There is the toBean() method but that looks like it is only for primitives.  I know you can convert a Java bean to a JSON object.
        >
        > GSON has something I could use but I don't want to use GSON.

        You are better of using a package that does data binding, such as
        Jackson or GSON.

        -+ Tatu +-
      Your message has been successfully submitted and would be delivered to recipients shortly.