Skip to main content

All Questions

Tagged with
-1 votes
0 answers
34 views

json to object in KMP

I have a json file in which there is information about animals and their names. I am attaching this json file for you. I want to know if I can use this file in multi-platform Kotlin and for Android ...
Aristotele Songhori's user avatar
0 votes
0 answers
48 views

How to display one object of api response in the cell at a time using tableview cells in

I have gotten some success to get to the end of the first nested array but now I have difficulties in shifting to next index Eg:- I am at { "choice" : 1742, "assessment" : 133, &...
Kshitij876's user avatar
-2 votes
1 answer
65 views

How to ignore part of the JSON?

In the following JSON I want to ignore the first part. JSON Example: { "game": { "friends": 10, "worlds": 50, }, "results": [ { "id&...
Ariel Antonio Fundora's user avatar
-1 votes
1 answer
48 views

Error mapping Optional JSON to RealmSwift @Persisted

Issue: There are two different objects within the array I am attempting to map and store into a RealmSwift database. However this parameter (@Persisted var folderItems: List) which is optional and ...
Shin0mar's user avatar
0 votes
1 answer
63 views

I'm encountering an error with my POST API request: 'Error parsing JSON'

I'm new to SwiftUI and having trouble posting an API request, I have checked everything but still getting 500 server error message. I'm stuck on this please help if possible Response data: <!...
Manish kumar's user avatar
1 vote
1 answer
60 views

How do you make data in an array nested within JSON data identifiable so you can list the data?

My goal is to display some data from a JSON file in a List in SwiftUI. This is for iOS 17. I have tried a lot of different things and have done some research, but cannot find the solution. Here's an ...
jwhite318's user avatar
0 votes
3 answers
111 views

Create JSON from given data in Swift

I want to execute POST URLRequest but first I need to create request body. The body should look like this: { "model": "gpt-4-vision-preview", "messages": [ { ...
Vader20FF's user avatar
  • 343
0 votes
0 answers
11 views

_TypeError (type 'String' is not a subtype of type 'Map<String, dynamic>')

I'm trying to get data from api but when i fetch it give an String it not a sub type of map<String,dynamic> how can i solve this here is my model class i don't know where is issue appear i think ...
Mahmoud Shaaban's user avatar
0 votes
1 answer
98 views

Sending Data in dictionary in form of x-www-form-urlencoded but it expects JSON

I sent my data as url-encoded form: JobId=564876565946&UstaId=242816809697&Comment=&Ratings=%5B%7B%0A%20%20%20%20QuestionId%20%3D%203533%3B%0A%20%20%20%20Rating%20%3D%204%3B%0A%7D%2C%7B%0A%...
Ali Efe Baruş's user avatar
0 votes
2 answers
143 views

Parsing JSON with curly and straight quotes

I'm trying to make an app using a specific API, but the problem is the response is quite tricky. Most of the keys and values are inside straight quotes (") except for one. One of the values ...
Josleyn Santos's user avatar
3 votes
2 answers
168 views

In Swift5 with Codable, easily handle json key that begins with a dollar sign such as "$date"

Example, I often see this sort of thing, "Length": 0, "TestDate": { "$date": "2023-09-20T05:00:00.0000000Z" ...
Fattie's user avatar
  • 13.9k
0 votes
0 answers
157 views

How to create data tables with all columns displayed?

I just recently started learning SwiftUI and found that my table had only 1 column and not the remaining columns from my JSON data. Can anyone please suggest how to display all the columns for a data ...
mk117's user avatar
  • 763
0 votes
1 answer
117 views

500 Error: '_Map<String, dynamic>' is not a subtype of type 'String'

I've authentication feature in the iOS app (on flutter), here is the User class: class User { final String fullname; final String username; final String email; final String password; final ...
Diana's user avatar
  • 703
0 votes
0 answers
54 views

How to show selected JSON data in the pickerview?

I have a 2 textviews and 2 pickerviews. I want the user to select the city and district of that city. When I select the city I want to list the districts of that city in the pickerview. I don't use ...
yusuf kutlay's user avatar
0 votes
0 answers
112 views

Wrong order of arrays in JSON-decoded Object stored with SwiftData

I'm building a vocabulary app. On first launch, the JSON is decoded and the resulting objects are saved using SwiftData. The JSON is structured in layered Arrays (Array of Units that have each have an ...
trsommer's user avatar

15 30 50 per page
1
2 3 4 5
604