json « jaxb « Java XML Q&A

Home
Java XML Q&A
1.convert
2.Development
3.document
4.dom
5.dom4j
6.dtd
7.element
8.jaxb
9.jaxp
10.jdom
11.jsoup
12.namespace
13.Node
14.parse
15.parser
16.pdf
17.sax
18.schema
19.stax
20.tag
21.transform
22.Validation
23.xalan
24.xmlbeans
25.xpath
26.xsd
27.xslt
28.xstream
Java XML Q&A » jaxb » json 

1. Display null for objects -JSON- JAXB    stackoverflow.com

I want to marshal null objects as null in the JSON representation. But, right now, Am not seeing the element in the JSON if the object is null.

Example:
@XmlAccessType(FIELD)
@XmlType(name="foo" propOrder={"foo"}
class foo{
@XmlElement
   ...

2. Jettison and JAXB Automatically Changes Data Type in JSON Response    stackoverflow.com

I'm using Resteasy 2.0.1.GA and Resteasy-jettison-provider-1.2.GA with JAXB annontations and whenever I have a String property that contains all numbers (i.e. String groupName="1111";), the JSON response will display it as a ...

3. JAXB A cycle is detected in the object graph    stackoverflow.com

this is my first post I want to convert my pojo to json with JAXB, my pojo have one to many relation, and when i convert my pojo to json, JAXB generate ...

4. Jettison JSON Automatically Changes Data Type    stackoverflow.com

I'm using Resteasy 2.0.1.GA and thusly Resteasy-jettison-provider-1.2.GA and whenever I have a String property that contains all numbers (i.e. String test="1111";), the JSON response will display it as a number by ...

5. JAXB - JSON root not being generated    stackoverflow.com

I'm using JAXB to serialize my objects to JSON. My problem is that the generated JSON does not have the 'ROOT' element. Here is the code for one of my classes:

@Entity
@Table(name = "Group")
@XmlRootElement(name ...

6. RESTEasy json JAXB unmarshalling issue    stackoverflow.com

I writing small Tweeter like application in Play! with simple REST API using RESTEasy. I have a simple resource:

@GET
@Path("/tweets/all")
@Produces("application/xml")
public TweetList all(@QueryParam("page") @DefaultValue("1") Integer page) {
    //return Tweet.find("order by ...

7. Which Java JSON libraries make good reuse of JAXB annotations?    stackoverflow.com

I am developing a project that already uses XML serialization, so I need an elegant solution to support JSON, by reusing the JAXB annotations. Can anyone recommend some Java JSON libraries that ...

8. Can I create classes from json data similar to jaxb    stackoverflow.com

So my code is a client of an api, the data is returned as xml and Ive been able to create valid xsd file from some examples of that xml and ...

java2s.com  | Contact Us | Privacy Policy
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.