FasterXML is an open source XML and JSON parsing for the Java platform
Questions tagged [fasterxml]
489 questions
-1
votes
1 answer
Best way to validate json file in java
I want to validate the JSON file. I checked readValue from fasterXML but I see it return object. Is there any to validate JSON files efficiently without compromising performance?
public T readValue(File src, Class valueType)
Thank you

Salman
- 127
- 1
- 10
-1
votes
1 answer
How to convert CSV to JSON with value in double quotes using com.fasterxml.jackson.dataformat.csv.CsvMapper in Java?
Suppose CSV data is like below:
SiteName,Location, Recurrence Type, Time Zone
TestSite_QA2_0401,QA_LocationAZ_0401,"FREQ=WEEKLY;BYDAY=MO,WE",Europe/Paris
Expected JSON:
SiteName=TestSite_QA2_0401, Location=QA_LocationAZ_0401, Recurrence…

Dipali Dom
- 1
- 1
-1
votes
1 answer
fasterxml jackson JSON deserialization - custom adding
I use Jackson FasterXML product to deserialize JSONs. Now, I noticed in profiler that I got a ton of duplicate strings as a result since every time I receive a JSON it deserialize into an object which always contains some String variable which tells…

Maxim Terletsky
- 113
- 8
-1
votes
1 answer
HashMap -> Json -> Print - Without Creating file -> using fasterxml API
I'm having a hash map with set of keys and values.
I would like to convert it to a json format and print the entire string.
I don't like to create a file and need to dynamically print the string in the screen. i'm using fasterxml api.…

Kathir J
- 1
- 3
-1
votes
1 answer
Deserialize a JSON response to multiple objects
I need to deserialize a Json response
response: {
speed: 40,
distance: 20,
time: 3
}
into 3 different objects, that is
Class Speed implements Base{
int speed;
}
Class Distance implements Base{
int distance;
}
Class Time implements Base{
…

user3571458
- 9
- 4
-2
votes
2 answers
How to convert string to JSON using ObjectMapper?
I need the following JSON format using ObjectMapper using Java.
ObjectMapper mapper = new ObjectMapper();
User user = new User();
user.set_id(1);
int id = 2;
user.setIndex("{\"_id\":" + id + "}");
mapper.writeValue(new…

AVM
- 243
- 3
- 8
-2
votes
1 answer
How to pass JSON from static file to rest controller SpringBoot App
I have a stable SpringBoot project that runs. I want to add a end point that reads a json file from classpath and passes it through to the response without having to create any Model objects (pass thru).
I have no issues reading the json file into…

xpagesbeast
- 776
- 1
- 10
- 21
-2
votes
2 answers
Map nested json field
I have json like this:
{
"name": "John",
"address": {
"city": "New York"
}
}
How can I deserialize it to the follow dto using Jackson?
final class PersonDto {
private final String name; // name
private final String city; //…

maximusKon
- 136
- 9
-2
votes
1 answer
JSON deserialization works from test but not from servlet
I am using the following code to deserialize a JSON object:
System.out.println("Trying to deserialize the following string: " + jsonString);
DRRequest elements = JSONMapper.objectMapper.readValue(jsonString,…

user000001
- 32,226
- 12
- 81
- 108