I'm working on a project which uses Jersey to convert objects to JSON. I'd like to be able to write out nested lists, like so:
{"data":[["one", "two", "three"], ["a", "b", "c"]]}
The object ... |
I have the following JSON, where can be either true or false:
{"flag1":<boolean value>, "flag2":<boolean value>}
And I have tried to bind it to a Java class using Jersey and the following ... |
I have a really simple rest web service returning a list of questions. This code works as expected when the number of questions returned are greater than zero. But if the ... |
I have the following java class
@XmlRootElement
@XmlSeeAlso(DataClass.class)
public static class EnvelopeClass<T> {
@XmlElement
public String version;
@XmlElement
public T data;
...
|
I trying to learn how to write RESTful apps in Java using Jersey and
Hibernate, and I'm struggling to understand how to handle parent/child type
relationships when POSTing data to a Resource. I'm ... |
We are using a Jersey JAXBContext resolver implementation using @Provider. It appears that Jersey is not recognizing the @Provider class - the code is never being executed. ... |
We have a Java List of objects which is marshalled via JSON which is created by Jersey.
The List is called "rows". When there is data we have:
{"records":"1","page":"1","total":"1","rows":[{"id":"692334","cell":["ECS","D","201009","","0","ABCD","11","11","","201009"]}]}
When there is no ... |
|
I'm trying to force brackets on lists that contain only one element.
I want something like this:
{"id":"0","industries":[{"id":"0","name":"Technologies"}],"name":"Google Inc."}
But I get:
{"id":"0","industries":{"id":"0","name":"Technologies"},"name":"Google Inc."}
Here is my Entity:
@Entity
@XmlRootElement
public class Company {
private int id;
private String ...
|
I have a problem with development resteay+ejb+json. Using Jboss-5.1.0.GA. I get example from resteasy-jaxrs and adapted to use for my case.
Added jars(this ask me jboss. in other case catch exception ... |
I have a Books class with ArrayList of BookMeta objects , the name of the arraylist is bookList.
If the bookList holds more than one BookMeta, it works good for the clients ... |
I have successfully implemented a restful service that works with my own client. Now, I wish to make it a service that other clients can also interact with it. In this ... |
i have a simple jersey web service and i'd like to consume / produce objects that contain map fields, like
@XmlElement
private Map<String,String> properties;
if this string goes into the web service,
{ properties: { ...
|
I'm trying to implement a RESTful Service in Java that receives a JSON Object through a PUT request and automatically maps into a Java Object. I managed to do this in ... |
I've been trying to create a Jersey REST Webservice. I want to receive and emit JSON objects from Java classes like the following:
@XmlRootElement
public class Book {
public String ...
|
I'm trying to unmarshall some received json (from Jira restful web service).
Problem is: an "issue" has a "summary" property and a list of fields.
Summary is not present as an attribute ... |
I cant seem to post JSON to my webservice but XML works fine:
@POST
@Consumes({"application/xml","application/json"})
public void addOrder(JAXBElement<OrderBean> order) {
System.out.println("COOL");
...
|
I am using jersey to expose a service which uses jaxb annotated classes to configure the look of the json.
I am trying to include the type directive in each json element. ... |
I'm doing this :
WebResource resource = client.resource(urlStr);
resource.accept(MediaType.APPLICATION_JSON_TYPE, MediaType.APPLICATION_XML_TYPE); GenericType<List<EMailInformations>> genericType = new GenericType<List<EMailInformations>>() {};
List<EMailInformations> response = null;
try{
response = resource.get(genericType);
} catch (UniformInterfaceException ue) ...
|
I have a class that has JAXB and bean validation annotations, much like the following:
@XmlType(namespace = "urn:com:company:assessment")
@XmlRootElement
public class Assessment
{
// ...
@NotNull
...
|
In my Jersey-based REST webservice I need to provide xml and json output. The class Result has a map, annotated with XmlJavaTypeAdapter to correctly serialize it to xml.
@XmlRootElement
public class Result {
...
|
I have a strange issue marshalling an empty object collection to json using jersey with the jaxb based json support. My object looks like
...
@XmlWrapper(name = "stuff") @XmlElement(name = "s")
private List<Foo> foos;
...
Marshaling ... |
Hi, I'm using GlassFish V2 with jersey 1.0 and JAXB. I have RESTful Web Service which expose several resources. I'm using container-item pattern. My problem is that when the container converter ... |