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
1 answer

Alamofire and Objectmapper adding array data to tableview

please I need help I am new in swift and programming. I could not figure out how I can get my data in the table view cells. // this is my API [{"title":"Taylor Swift","artist":"Taylor…
sara
  • 1
  • 4
-1
votes
1 answer

Core Data returns 0 values even after saving in Context

I have a core data singleton class like this : class CoreDataUtil { static let shared = CoreDataUtil() var container:NSPersistentContainer? = AppDelegate().persistentContainer var mainContext:NSManagedObjectContext? =…
Reckoner
  • 1,041
  • 2
  • 13
  • 29
-1
votes
1 answer

UICollectionViewCell error

My json data is like that and I'm using alamofire for loading data and objectmapper for mapping.I just try to parsing json data and show it on CollectionView.However Im getting error. Here is my viewcontroller import UIKit import Alamofire import…
user9120563
-1
votes
2 answers

Can not get Java object from JSON string(with inner arrays)

I'm trying to get Java Object from JSON string that has inner arrays, there are pretty same questions, but none couldn't solve my problem. Now in console i get MethodPackage.JsonDeserialize@6580cfdd (I'm doing with objectmapper) My aim is to get…
Marks
  • 21
  • 1
  • 7
-1
votes
4 answers

How to Convert JSON to JAVA Object using ObjectMapper?

Java Object class B { private String attr; /***** getters and setters *****/ } class A { private String attr1; private String attr2; private Map attr3; /***** getters and setters *****/ } Json Object json =…
-1
votes
1 answer

Get value from a mapped array by Alamofire Object Mapper Swift

Below is my code I used to map my JSON using Object Mapper, I successfully filtered arrays. Alamofire.request("https://project-isdental-cammy92.c9users.io/api/v2.0/company/1", method: .get, parameters: nil, encoding: URLEncoding.default, headers:…
Shikha Sharma
  • 451
  • 1
  • 5
  • 25
-1
votes
2 answers

ObjectMapper: Dictionary key as value in Mapped objects

{ "3": { "title": "something" }, "28": { "title": "something else" } } How do i cast this json to array of Content objects using ObjectMapper? struct Content: Mappable { var id: String? //Expected value is 3, 28 var title:…
Avi
  • 2,196
  • 18
  • 18
-1
votes
1 answer

How to ignore a json field and get its value to map using Jackson ObjectMapper

Given the below json { "countries":{ "country":[{ "name":"USA", "independence":"July 4, 1776", }], }, } I will like to ignore "countries" and get the value of country instead. hence, after…
user3137376
  • 1,527
  • 2
  • 19
  • 29
-1
votes
1 answer

How to return a JSON string embedded in a dictionary using Alamofire/ ObjectMapper?

I'm having issues trying to access a string inside of a JSON dictionary, Here is the JSON data, the string I'm trying to access is the "link" value : channels = ( { social = { facebook = { …
SwiftyJD
  • 5,257
  • 7
  • 41
  • 92
-1
votes
1 answer

How to save whole Object in NSUserDefaults

I am using ObjectMapper to map JSON responce from my server. Here is my data model. class HomeStats: Mappable { // MARK: - Constants & Variables var todayText: String var pointsText: String var todayActivitiesText: String var totalPointsText:…
Byte
  • 629
  • 2
  • 11
  • 29
-1
votes
3 answers

Creating a Student object for unit test

I'm new to Java and needed some help. I have a utility class that has two methods where one method converts Json string to object and the other converts an object to Json string I wanted to test these methods with junit. For this test purpose I…
Qad
  • 51
  • 3
  • 7
-1
votes
1 answer

map top level JSON String array Object Mapper

How to mpa top level JSON String Array JSON Response from server [ "tag1", "tag2", "tag3", "tag4", "tag5", "tag6" ] I am Using ObjectMapper Swift
harsh_v
  • 3,193
  • 3
  • 34
  • 53
-2
votes
1 answer

Generic List object mapper

I am trying to get a generic list from object mapper but it not retunning a type specific list. public List invokeService(T request, String url,Class type) { HttpEntity requestEntity = new HttpEntity<>(sdsRequest, headers); …
Chandresh Mishra
  • 1,081
  • 3
  • 24
  • 45
-2
votes
1 answer

How to map JSON object with java Pojo class ignoring parent class spring boot?

I want to map below Json object with Java Pojo class ignoring parent class AuthToken. { "AuthToken" : { "id" : "1", "token" : "abcde1234xyz", "extendSession" : null } } Pojo Class public class TokenAccessResponseDTO { …
Bhavesh Shah
  • 127
  • 2
  • 14
-2
votes
1 answer

jackson objectMapper.readValue fails on empty values

I'm trying to read this json file into a Map { "1": 0, "2": 1, "3": , "4": 5 } my json is very simple but as you see in the example it can have a key with an empty value (null value) on "3". parsing it by: Map testMap =…
Tali
  • 37
  • 5