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
0
votes
0 answers

JSONModel arrayOfModelsFromDictionaries returns null, when tested on device

As the title says, does JSONModel arrayOfModelsFromDictionaries returns null, it works fine on the simulator, but not on the device. My JSON has the following structure: [{"data1":"a","data2":"b"},{"data1":"a","data2":"b"}] I have two JSONModel…
0
votes
1 answer

Multiple KeyMappers per JSONModel

JSONModel lets you convert a model object into a NSDictionary as following: NSDictionary *dict = [myJSONModel toDictionary] It includes all properties of the model (except optional). However, I also need to create multiple dictionaries having only…
Yas Tabasam
  • 10,517
  • 9
  • 48
  • 53
0
votes
1 answer

JSONModel Error: "Type not allowed" works on iOS 7 not on iOS 6

I have two classes === PEOPLE ==== @protocol People @end @interface People : JSONModel @property (strong, nonatomic) NSString *id; @property (strong, nonatomic) NSString *userName; @end === PEOPLE CONTAINER ==== @interface…
rohit kotian
  • 130
  • 1
  • 13
0
votes
2 answers

Stuck with JSONModel and NSMutableArray

I'm using JSONModel to retrieve data from a simple webservice. I need to get the values of key @"message" into a mutable array. - (void)viewDidLoad { [super viewDidLoad]; self.delegate = self; self.dataSource = self; NSString…
Thomas
  • 622
  • 5
  • 13
0
votes
1 answer

didSelectRowAtIndexPath not working with NSNotificationCenter

I have a MasterDetail app that I am working on that will be used to show players (as in sports) and detail stats. The list of players is called from a Postgres Database and parsed from JSON using the JSONModel. So far, I am able to get all of the…
CaptJak
  • 3,592
  • 1
  • 29
  • 50
0
votes
0 answers

how to add a jsonmodel object to NSArray

I am using jsonmodel : - (NSMutableArray *)ChildIntRecursiveWithChannels:(Channels *)channels depths:(NSMutableArray *)depths number:(int)number { …
pengwang
  • 19,536
  • 34
  • 119
  • 168
0
votes
1 answer

how to get a NSArray object using JSONModel

i have a problem in reading JSON by JSONModel library https://github.com/icanzilb/JSONModel and use the KivaDemo at the JSonModel app,the json : "loans": [ { "id": 547665, "name": "Veronica", "description": { "languages": [ "en" …
pengwang
  • 19,536
  • 34
  • 119
  • 168
0
votes
1 answer

Using JSONmodel to try and fetch data from a server to ios device

I've been trying to use JSONmodel to try and get data from my server to my ios device. I've set up my classes properly but for some reason it keeps coming back null after calling the url. feed = [[Feeds alloc]…
user1179321
  • 797
  • 1
  • 10
  • 24
-1
votes
1 answer

Complete data not getting bind to view in Fiori

I have 2 views in Fiori. From the first view the app is navigated to the second where an OData service is called and the data is bind to a JSONModel which is then bind to the XML and then a create service is called to complete the transaction and…
Swappy
  • 160
  • 1
  • 7
  • 29
-1
votes
1 answer

how to create complex json using json_model pakage flutter

"masses": [ { "Sunday": [ { "mass_timing": "7.00 AM", "mass_place": "First Mass", "mass_note": "English Mass" }, { "mass_timing":…
-1
votes
1 answer

NSArray element failed to match the Swift Array Element type Expected JSONPaymentCard but found __NSDictionaryI

I am using JSONModel to cast values from server: @interface PaymentCardsResponse: JSONModel @property (strong, nonatomic) NSArray *userCards; @end But when later I try to access this response.userCards.forEach { card in } //here…
Bartłomiej Semańczyk
  • 59,234
  • 49
  • 233
  • 358
-1
votes
1 answer

Promise All Syntax and the Frame of accepatble Operations

The Function Promise.all - does have the job, to wait of asynchronious Functions and do certain logic after those asynchronious functions are done. I couldn't find how exactly does this function work i.e. if you can do certain things. Example: In…
Roman11222
  • 43
  • 5
-1
votes
1 answer

Error while setting model inside onInit() of root view - no error / no log

I am trying to set a new JSONModel on the Main.view.xml (root view). But it seems like it is stoping at .setModel(). The console.log("after") is not logging. sap.ui.define([ "sap/ui/core/mvc/Controller", "jquery.sap.global", …
zerocool985
  • 3
  • 1
  • 4
-1
votes
2 answers

openui5 get Data from JSONModel

I got the problem, that if I set a JSONModel in my controller, I am not able to get the data out of it: var oModel = new JSONModel(jQuery.sap.getModulePath("QAQuickAccess",…
-1
votes
1 answer

sap ui5 with json data binding

If I have json data like this [{"processor":"Mr. XYZ","components":["asd","efg","ghi","fjk"]} , {"processor":"Mr. XYZ","components":["asd","efg","ghi","ghi"]} , {"processor":"Mr. XYZ","components":["asd","efg","lkl"]} ] If I am binding this to a…