0/160

java Questions

votes
Amir Rachum   2018-06-25 11:16

How to use Servlets and Ajax?

I'm very new to web apps and Servlets and I have the following question: Whenever I print something inside the servlet and call it by the webbrowser, it returns a new page containing that text. Is ...
agartzke   2018-06-26 10:53

Biggest GWT Pitfalls?

I'm at the beginning/middle of a project that we chose to implement using GWT. Has anyone encountered any major pitfalls in using GWT (and GWT-EXT) that were unable to be overcome? How about from a ...

How to parse JSON in Java

I have the following JSON text. How can I parse it to get pageName, pagePic, post_id, etc.? { "pageInfo": { "pageName": "abc", "pagePic": "http://example.com/content.jpg" } ...
Ollie Edwards   2018-06-28 17:31

How to use Jackson to deserialise an array of objects

The Jackson data binding documentation indicates that Jackson supports deserialising "Arrays of all supported types" but I can't figure out the exact syntax for this. For a single object I would do ...
Hadi Eskandari   2018-06-29 01:47

Ignoring new fields on JSON objects using Jackson

I'm using Jackson JSON library to convert some JSON objects to POJO classes on an android application. The problem is, the JSON objects might change and have new fields added while the application is ...
jshree   2018-06-29 02:43

Jackson with JSON: Unrecognized field, not marked as ignorable

I need to convert a certain JSON string to a Java object. I am using Jackson for JSON handling. I have no control over the input JSON (I read from a web service). This is my input JSON: {"wrapper":[{"...
Lucky Murari   2018-06-29 12:49

JsonMappingException: No suitable constructor found for type [simple type, class ]: can not instantiate from JSON object

I am getting the following error when trying to get a JSON request and process it: org.codehaus.jackson.map.JsonMappingException: No suitable constructor found for type [simple type, class com....
Liviu T.   2018-06-29 15:04

Gson: How to exclude specific fields from Serialization without annotations

I'm trying to learn Gson and I'm struggling with field exclusion. Here are my classes public class Student { private Long id; private String firstName = "...
jellyfish   2018-06-29 22:43

Google Gson - deserialize list<class> object? (generic type)

I want to transfer a list object via Google Gson, but I don't know how to deserialize generic types. What I tried after looking at this (BalusC's answer): MyClass mc = new Gson().fromJson(result, ...
Suraj Chandran   2018-06-30 01:50

Jackson Vs. Gson

After searching through some existing libraries for JSON, I have finally ended up with these two: Jackson Google GSon I am a bit partial towards GSON, but word on the net is that GSon suffers from a ...