skip to Main Content

Writing a JSON schema, problem with value type change

Here is what is returned from a API: [ { "id": "63c576504988e70xx", "value": { "text": "638dfbd58b3dde05xx" }, "idCustomField": "62ed5fa43601c14xxx", "idModel": "63c576504988e70249xxx", "modelType": "card" }, { "id": "63c576504988e71xx", "value": { "number": "8" }, "idCustomField": "62ed5fa43601c13xxx", "idModel": "63c576504988e70249xxx", "modelType": "card" }, {…

VIEW QUESTION

Json – How to use value of key in JOLT

I'm looking for breaking nested JSON file and trying to flatten them to fit into a SQL database. Current JSON: { "content": { "failedPerProductLineAndReason": { "Product1": { "Downsizing licenses is not allowed": 1 } } } } Expected outcome: {…

VIEW QUESTION

JSONDecoder returning nil while parsing

I have the following function: func executeGet( completion: @escaping (Data?, Error?) -> Void) { AF.request("https:URL", method:.get, headers:headers).response{ response in debugPrint(response) if let error = response.error { completion(nil, error) } else if let jsonArray = response.value as? Data{ completion(jsonArray, nil) }…

VIEW QUESTION
Back To Top
Search