FasterXML is an open source XML and JSON parsing for the Java platform
Questions tagged [fasterxml]
489 questions
0
votes
1 answer
Using builder to create nested XML
I'm using the Jackson set of classes to read in a CSV file, and convert it to xml, but need some advice on how to add a nested value.
The code I'm using is:
package reader;
import java.io.File;
import java.io.IOException;
import…

Rob Sked
- 277
- 1
- 5
- 15
0
votes
1 answer
FasterXML Jackson's JSON polymorphism with JsonSubTypes and JsonTypeInfo
This is a popular problem for FasterXML's Jackon JSON developers. I faced it when I had with similiar POJOs:
package net.package.dogs.retrievers
@JsonTypeInfo(use = JsonTypeInfo.Id.CLASS, include = JsonTypeInfo.As.PROPERTY, property =…

Hugo Tavares
- 314
- 4
- 14
0
votes
0 answers
spring, Jackson, Fasterxml Annotations not work
I'm using jackson and fasterxml. But i can annotate anything an there's no reaction on the annotation. The java Object should be parse to a json object an then with the springresttemplate it should be posted.
I always get a JsonMappingException,…

Simon Probst
- 1
- 1
0
votes
2 answers
How to serialize a list of POJO using FasterXML library
I'm using FasterXML to serialize POJO. I want to serialize a list of my POJO. When serialize a signle POJO I get the expected xml (there's one problem --> question 2) Here's my code:
List movies = new ArrayList<>();
// add…

Hunsu
- 3,281
- 7
- 29
- 64
0
votes
1 answer
fasterxml jackson ObjectMapping set @JsonView class not working
MappingJackson2HttpMessageConverter objConverter = new MappingJackson2HttpMessageConverter();
ObjectMapper objMapper = new ObjectMapper();
objMapper.setVisibility(PropertyAccessor.FIELD,…

kxyz
- 802
- 1
- 9
- 32
0
votes
1 answer
Issue while converting simple xml to java object using jackson faster XmlMapper
I have a simple xml which looks like this:
MyMerchant
this xml I want to convert into the following class:
@JsonTypeName( value = "token" )
public class Token{
@JacksonXmlProperty( localName = "merchant")
…

pDer666
- 707
- 5
- 22
0
votes
1 answer
JSON view with namespace for ember
I am using spring mvc with org.springframework.web.servlet.view.json.MappingJackson2JsonView to return json objects from controllers, To integrate with ember RestAdapter I need to return the json with namespace on it. How do I do that ?
Currently I…

NUS
- 383
- 1
- 6
- 17
0
votes
1 answer
Jackson serialization - get rid of empty properties after filtering
I'm using Jackson 2.4.3 and ObjectMapper, which is configured to exclude empty properties (JsonInclude.Include.NON_EMPTY), but I also using a custom PropertyFilter during serialization and some of properties are excluded (not written) by this…

Piotr Kozlowski
- 899
- 1
- 13
- 25
0
votes
1 answer
com.fasterxml.jackson.databind.ObjectMapper encoding for localised characters
A little background before I mention my main issue
We have a module that is converting POJO to JSON via FasterXML. The logic is there are multiple XMLs that are first converted into POJOS and then into JSON.
Each of these multiple JSONs is then…

HungryForKnowledge
- 289
- 1
- 8
- 18
0
votes
1 answer
What causes this java.lang.ClassCastException in fasterxml classmate
I had a code that validated the users data using hibernate validator. I have some entities that the user might input my program and they are inherited from an abstract class "AbstractEntity". this code worked fine.
but then I made AbstractEntity…

raven
- 775
- 6
- 22
0
votes
1 answer
cannot use custom object mapper for single objects in jersey (works for collections)
I'm using the latest release of Jersey (2.13) on a glassfish server together with the latest version of jackson (version. 2.4) . I've written and registered a custom ObjectMapper, but it only collections seems to be serialized by my custom…

Nolf
- 113
- 1
- 10
0
votes
1 answer
FasterXML: Could not deserialize form XML to POJO
I'm trying to deserialize XML.
localhost
8080
to POJO
class Storage {
private Server server;
}
class Server {
private String url;
private Integer port;
}
Here is my fire…

Alex
- 2,091
- 6
- 31
- 49
0
votes
0 answers
Is there a way to modify a POJO field and return the POJO
Is there a way to modify the field of POJO with new property(like using MixIns or @JSONProperty) and get the modified POJO back ? (A way to add/modify field of a POJO dynamically ?)
Like I have a class
class PojoA{
private T data;//field to…

Jayanth
- 329
- 4
- 15
0
votes
2 answers
Jackson ignores end of body
I have a problem with fasterxml Jackson where it ignores everything after the object like:
{
"startIndex": 0,
"length": 10,
"gotoLastPage": false
}
whatever comes here is ignored
I don't know if is possible to throw an error in this case.…

Franjavi
- 647
- 4
- 14
0
votes
1 answer
Custom Serialization based on User defined value
I've a pojo :
@JsonIgnoreProperties(ignoreUnknown = true)
public class Item
{
String name;
Long baseId;
@JsonIgnore
String status;
}
I'm using this Java Object for GET, POST and PUT api calls. I've used @JsonIgnore annotations To…

Suresh
- 1,063
- 1
- 11
- 16