Questions tagged [jsonmodel]

JSONModel is a library which allows rapid creation of data models on iOS, macOS, watchOS and tvOS. JSONModel introspects your model classes and the structure of your JSON input and reduces the amount of code you have to write. This tag is NOT related to "JSONModel" in SAPUI5!

JSONModel is a library which allows rapid creation of data models. JSONModel introspects your model classes and the structure of your JSON input and reduces the amount of code you have to write.

It works for iOS, macOS, watchOS and tvOS.

https://github.com/icanzilb/JSONModel

166 questions
-1
votes
1 answer

Best practices for JSONModel and polymorphism

How do you deal with subclassing collection attributes in JSONModel? Let's say I have these two endpoints with different responses of the same "product object". domain.com/api/1.0/getProductList domain.com/api/1.0/getProductDetails/productId I…
Andy
  • 128
  • 1
  • 8
-1
votes
4 answers

How to check if JSONModel class was initialized in Objective-c?

I have a JSONModel class in my objective-c application. I use this class with a singleton then initialize this class with this code: MyClass *client = [[MyClass alloc] init]; client = [[MyClass alloc] initWithDictionary:myDictionary…
user3745888
  • 6,143
  • 15
  • 48
  • 97
-1
votes
1 answer

SAPUI5 List binding with filtered data in XML view

I hope you are doing well Currently i'm trying to bind a filtered data to a list control in xml view in the oninit event of the controller the odata service url is like…
-1
votes
2 answers

How to set a Dictionary as Value in POST API Call - Objective C

I am making an API call in which the Parameters are as: { name : XYZ, marks : { maths : 34 } } I am using JSON model for making API calls and handling the response. Here is how I made params Dict: NSMutableDictionary *paramsDict =…
Rahul
  • 5,594
  • 7
  • 38
  • 92
-1
votes
2 answers

get data of a nestet JSONModel into a sap.m.table

i'm trying to display a table (sap.m.table) with 2 columns (Roles, User). the table get its data from a JSONModel model: { "roles":[ { "id":1, "name":"Administrator", "permissions":[ { "id":1, …
son-of-a-gun
  • 1
  • 1
  • 5
-1
votes
2 answers

JSON to Object in iOS with objective-c

I have object @interface Hourly (CoreDataProperties) @property (nullable, nonatomic, retain) NSDate *dt; @property (nullable, nonatomic, retain) NSNumber *temp; @property (nullable, nonatomic, retain) NSNumber *temp_min; @property (nullable,…
-1
votes
2 answers

JSONModel - can't assign fetched JSON to model like the tutorial

I try to store JSON like this tutorial http://www.touch-code-magazine.com/how-to-fetch-and-parse-json-by-using-data-models/ In the tutorial it declare LocationModel in LoanModel.h. @property (strong, nonatomic) LocationModel* location; Which work…
-1
votes
1 answer

Json Model Error

Getting the following error while using JSONMODEL to hit a web service. "Error Domain=JSONModelErrorDomain Code=2 "Bad network response. Probably the JSON URL is unreachable." UserInfo=0xa1aeea0 {NSLocalizedDescription=Bad network response.…
-1
votes
2 answers

iOS: Using JSONModel, how do you grab dictionaries with numeric key?

I'm currently using JSONModel by icanzilb to parse my JSON structures obtained online. The issue is that I have a dictionary which has numeric keys, plus these numeric keys are generated by the server on-demand. So theoretically I have no advance…
Marcus
  • 548
  • 1
  • 5
  • 13
-1
votes
1 answer

JSONModel incorrectly converting 'T' to '0' on 32-bit devices

I am experiencing an interesting issue regarding JSONModel and the conversion of the string T to a BOOl. I am getting passed a string value T in the JSON and need to convert it to a BOOL. Using JSONModel, the conversion works on 64-bit devices,…
tentmaking
  • 2,076
  • 4
  • 30
  • 53
-1
votes
3 answers

Objective-C deserialize JSON into objects using JSONModel

Is there a way using JSONModel library without inherit the JSONModel class. I want to deserialized JSON to Objective C class without inherit form JSONModel. Is there another library that deserialized JSON into objects without inheritance?
moran
  • 51
  • 2
  • 9
-1
votes
1 answer

Objective-C Json Deserializing (null values cannot be deserialized)

I am making http post from iOS to my web service which was written on .NET platform. I am using JSONModel to serialize/deserialize and AFNetworking to make http requests. I can make request and get response successfully. But when any variable on…
JustWork
  • 1,944
  • 3
  • 22
  • 34
-2
votes
3 answers

How to map ordered NSDictionary using JSONModel

I've got a JSON as below. odds: { 0501: { x: 2.75, description: "a" }, 0502: { x: 3.25, description: "b" }, 0513: { x: 3.5, description: "c" }, 0503: { x: 3.5, description: "d" }, 0505: { x: 7.5, description: "e" }, 0504: { x: 7.5, description:…
miletliyusuf
  • 982
  • 1
  • 10
  • 12
-2
votes
4 answers

What's wrong with JsonModel for iOS

This has been working for me before, but suddenly it has stopped working. I had an object Coupon parsed well by JSONModel, and indeed the object is not null, but when I cast some of the properties, for example coupon.title I get this error. ***…
Rafael Ruiz Muñoz
  • 5,333
  • 6
  • 46
  • 92
-2
votes
2 answers

JSONModel with Objective C Tutorials

I am a newbie to Objective C. I want to know 1) Is there best Objective C tutorials for beginners? and I have to do project that interacts with ASP.Net backend server. So 2) Is there any good tutorials or video lectures for using JSONModel with…
zavrina
  • 305
  • 3
  • 14
1 2 3
11
12