FasterXML is an open source XML and JSON parsing for the Java platform
Questions tagged [fasterxml]
489 questions
0
votes
1 answer
Json Deserializer not detected by Spring
I have a Spring Rest Controller and a "command"/DTO object for the POST method on the controller. I also wrote a serializer / deserializer for one of the fields "due" - which is a Calendar object.
Since Jackson2 dependencies are defined in pom.xml,…

Jigish
- 1,764
- 1
- 15
- 20
0
votes
1 answer
Serialize a bean to json string using com.fasterxml.jackson with the following format
In general, jackson is serialize beans to standard json format, for example, the following class:
public class Person {
private String name;
private int age;
// getter/setter
}
will serialize to following json:
{
"name" : "test1111",
…

MikanMu
- 21
- 4
0
votes
1 answer
Fasterxml - How to exclude an object from json file?
I have mapped entities which I send in JSON format to the service. Here is my entities
@Entity
@Table(name = "company")
@JsonIdentityInfo(generator = ObjectIdGenerators.PropertyGenerator.class, property = "id")
public class Company implements…

Arkasha
- 117
- 2
- 12
0
votes
1 answer
How to use Jackson Annotation to do a mapping
Simply I have a POJO like this:
@JsonInclude(value=Include.NON_EMPTY)
public class Contact {
@JsonProperty("email")
private String email;
@JsonProperty("firstName")
private String firstname;
@JsonIgnore
private String…

Afshin Moazami
- 2,092
- 5
- 33
- 55
0
votes
1 answer
FasterXML Hibernate OneToMany get id in xml
I have currently a big problem with Hibernate and Jackson FasterXML.
I have a parent class "Structure Parent" with :
@OneToMany(mappedBy = "structureParent", cascade = CascadeType.ALL, fetch = FetchType.EAGER)
private List sites = new…

BkSouX
- 739
- 5
- 13
- 29
0
votes
1 answer
FasterXml: filter collection
Question How to indicate ObjectMapperthat he should filter object's nested collection by some criteria (field). See explanation via code:
Explanation via code:
I have to convert Container object to JSON. But I want to filter entries collection based…

VB_
- 45,112
- 42
- 145
- 293
0
votes
1 answer
FasterXML schema generation for Maps and Object references
I have an issue generating a JSON Schema file with FasterXML.
The file output just shows
object type for a Map
null type for OtherBean
{
"type": "object",
"properties": {
"beanId": {
"type":…

DarVar
- 16,882
- 29
- 97
- 146
0
votes
0 answers
Fasterxml: can't parse subtype from json
Problem:
Fasterxml can construct an object when it use abstraction in setters. See code below
Can not construct instance of CarState, problem: abstract types either need to be mapped to concrete types, have custom deserializer, or be instantiated…

VB_
- 45,112
- 42
- 145
- 293
0
votes
1 answer
Jackson doesn't deserialize
I am struggling with deserializing with Jackson fasterXml.
I guess there is something about type information and polymorphic use.
I tried different things after reading jackson docs and this but still do not manage to get it. Serialization goes well…

Yves Nicolas
- 6,901
- 7
- 25
- 40
0
votes
1 answer
make @jsonignore use a setter over a isMethod?
This is my class
public class HouseJPAImpl implements House {
public RoomJPAImpl room;
public RoomJPAImpl getRoom(){
return this.room;
}
public void setRoom(RoomJPAImpl room){
this.room = room;
}
@Override
public boolean isRoom(){
return…

allegjdm93
- 592
- 6
- 24
0
votes
1 answer
fasterxml jackson: there is no necessary methods to use @JsonView functionality
I try to organize dynamic @JsonIgnore property when I convert java-object to json-string. In example
it works in next way
for (codehause jackson)
ObjectMapper oMapper = new ObjectMapper();
oMapper.setSerializationConfig(...
or in example for…

VB_
- 45,112
- 42
- 145
- 293
0
votes
1 answer
Jackson JSON - @JsonProperty overriding @JsonView?
I have the following class:
class Bean {
private int x;
private int y;
public Bean(int x, int y) {
this.x = x;
this.y = y;
}
@JsonProperty("x")
@JsonView(View1.class)
public void setX(int x) {
…

755
- 2,991
- 3
- 20
- 34
0
votes
1 answer
restlet 2.2, configure jackson format support
Restlet 2.2 uses the fasterxml jackson library to support json serialization.
There are other data bindings supported by jackson, other than json, and included with the restlet 2.2 distribution. As such, many jars are loaded at program start time. …

jptknta
- 787
- 6
- 15
-1
votes
1 answer
com.fasterxml.jackson.databind.exc.UnrecognizedPropertyException: Unrecognized field "field" (class com.mapper.example.Parent)
I got a deserialization problem:
Trying to convert class which extends parent class. Please find my class below,
public class Base {
Parent parent;
public Parent getParent() {
return parent;
}
public void setParent(Parent…

Joe
- 9
- 3
-1
votes
1 answer
Ignore property when converting object to json string but not when converting string to Object using by Jackson library
I have a REST API that provides me a JSON. In the json I receive from the REST API, there is a ID property I want to read so I can do some checking on it. However, when I want to write back to the web server, the ID property must not be present in…

Anish Nagaraj
- 31
- 7