Questions tagged [objectmapper]

ObjectMapper is a library for simple JSON object mapping in Swift.

ObjectMapper is a library for simple JSON object mapping in Swift.

1145 questions
-1
votes
2 answers

Set child node as root node using jackson

The question is quite simple: From this: { "categoryId":"some_id", "properties": { "id": "braja_de_nana", "displayName": "test", "longDescription": "

TESTE

", "active": true, …
-1
votes
1 answer

ObjectMapper setSerializationInclusion(JsonInclude.Include.NON_NULL) setting is not reflected

ObjectMapper still includes null values. I tried a lot of solutions found here, but nothing works. I cannot use json annotation, so my only solution is predefined setting of mapper, but this was not reflected. I thought this was due to caching of…
XChobot
  • 3
  • 4
-1
votes
1 answer

Create list of custom objects from flat JSON data

I want to create an arraylist of type Adapter from a JSON. But since the JSON is not in arraylist format, I'm unable to use gson.fromJson() method. Is there any way by which I can create a list of my custom object by parsing the following JSON? JSON…
u13k
  • 9
  • 1
-1
votes
1 answer

What is the best way to extract a value without having a Java Object class

I have a string like below { "id": "abc", "title": "123.png", "description": "fruits", "information": [ { "type": "apple", "url": "https://apple.com" }, { "type": "orange", …
Mikasa
  • 321
  • 7
  • 16
-1
votes
1 answer

updating json file / writing more than one value into json from java

im stuck at trying to update .json from java app. theres only one method from it when using ObjectMapper but cant figure out parameters. first parameter is object to update but i have no idea how to pass it? i mean, its in file. second and last…
-1
votes
1 answer

UITableViewSections from Array of Objects

i'm trying to achieve the following. i'm mapping an xml string into a tableview. This part is working fine, however i want to make sections in the tableview as well. I need the LINENAME to be the SectionName and the NODENAMES should be underneath…
-1
votes
3 answers

How to wrap JSON object to single-element array in Java

I have a class in Java that I want to convert to JSON. The server which accepts this input expects a single-element JSON array, containing a key-value map For instance, if you have a class as shown: public class Input { private String id1; …
Jared
  • 73
  • 6
-1
votes
2 answers

SpringBoot:How can I bind two JSON pojo into two seperate objects using Wrapper Class and save them to my DB?

I have used Wrapper Class to keep both the Objects in JSON but when I am trying to fetch it using @RequestBody in my Controller I am getting a NullPointerException. I think the code structure will make more sense in understanding. Model -…
Arpita Mitra
  • 23
  • 2
  • 8
-1
votes
1 answer

Converting map to POJO with Jackson ObjectMapper throws exception

I have a MultivaluedMap which represents the form parameters of a POST request. I'd like to convert a POJO from this class with only those fields I need for further processing. I found some answers which suggest using convertValue()…
Robert Strauch
  • 12,055
  • 24
  • 120
  • 192
-1
votes
1 answer

How to skip a map of map when deserialize from Json String to Object using object mapper

I have a map of map in my POJO which is always null. When i convert a json string to java object, then i am getting a deserialization error because of the map. So how can i skip the map while converting the json string to object
Jijo
  • 107
  • 1
  • 1
  • 10
-1
votes
1 answer

Read json string with array values

Finding issues in reading the json string using object mapper read value method. Can be able to retrieve the individual fields but unable to read array values as mentioned below. { "Stuname":"Test", "State":"CREATE", "resourceIds": ["{stuId:…
Java Learner
  • 87
  • 1
  • 2
  • 8
-1
votes
1 answer

Adding the name of the class to the json

I'm new to json and objectMapper in Java, and I have a class with two fields, and I want to create json of this class, but I only get using the mapper the attributes. How can I do this? public class Car{ String a; String b; } ObjectMapper…
-1
votes
1 answer

Could not cast value of type '__NSCFData' (0x39490110) to 'NSString' (0x394990ac)

There is crash while the casting the jsonstring to object using objectMapper framework in the following part of the code but the way I have implemented is correct I guess. Could not cast value of type '__NSCFData' (0x39490110) to 'NSString'…
Rakesh
  • 302
  • 3
  • 19
-1
votes
2 answers

How to deserialize JsonString using ObjectMapper with Generic Type of a class

Let's say If I have a model class ResponseModel @Setter // This one not working public class ResponseModel { private Class responseClass; private String content; // JsonString public T getContent() throws IOException { …
W.Phromma
  • 133
  • 1
  • 3
  • 8
-1
votes
1 answer

Parse a JSON data efficiently using ObjectMapper iOS

Hi I have a JSON that is in the given format "exclusions": [ [ { "facility_id": "1", "options_id": "4" }, { "facility_id": "2", "options_id": "6" } ], [ { …
Avinash Sharma
  • 665
  • 1
  • 7
  • 23