Replies: 1 comment
-
Please ignore this. I posted it in the incorrect location |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hi,
I'm trying to get the scenes from OBS server.
I do:
func discoverScenes() async throws {
let response: OBSResponse.GetSceneList = try await client.getSceneList()
DispatchQueue.main.async {
self.scenes = response.scenes.map { $0.sceneName }
}
}
jsonParseError(encapsulateError: Swift.DecodingError.valueNotFound(Swift.String, Swift.DecodingError.Context(codingPath: [CodingKeys(stringValue: "d", intValue: nil), ResponseKeys(stringValue: "responseData", intValue: nil), CodingKeys(stringValue: "currentPreviewSceneName", intValue: nil)], debugDescription: "Cannot get unkeyed decoding container -- found null value instead", underlyingError: nil)), source: "{"d":{"requestId":"02A0395C-33E3-4185-9336-B1D41F415DDC","requestStatus":{"code":100,"result":true},"requestType":"GetSceneList","responseData":{"currentPreviewSceneName":null,"currentPreviewSceneUuid":null,"currentProgramSceneName":"Nog een scene","currentProgramSceneUuid":"510907c8-5217-47c1-904e-c438f1c01ca0","scenes":[{"sceneIndex":0,"sceneName":"Nog een scene","sceneUuid":"510907c8-5217-47c1-904e-c438f1c01ca0"},{"sceneIndex":1,"sceneName":"Scène 2","sceneUuid":"aeebe1ed-b454-4465-8caa-606ca32a99a5"},{"sceneIndex":2,"sceneName":"Scène","sceneUuid":"249cb29d-b88a-4276-9582-9a007d0b09b4"}]}},"op":7}")
or, more readable, this is the json it doesn't like:
{
"d": {
"requestId": "02A0395C-33E3-4185-9336-B1D41F415DDC",
"requestStatus": {
"code": 100,
"result": true
},
"requestType": "GetSceneList",
"responseData": {
"currentPreviewSceneName": null,
"currentPreviewSceneUuid": null,
"currentProgramSceneName": "Nog een scene",
"currentProgramSceneUuid": "510907c8-5217-47c1-904e-c438f1c01ca0",
"scenes": [
{
"sceneIndex": 0,
"sceneName": "Nog een scene",
"sceneUuid": "510907c8-5217-47c1-904e-c438f1c01ca0"
},
{
"sceneIndex": 1,
"sceneName": "Scène 2",
"sceneUuid": "aeebe1ed-b454-4465-8caa-606ca32a99a5"
},
{
"sceneIndex": 2,
"sceneName": "Scène",
"sceneUuid": "249cb29d-b88a-4276-9582-9a007d0b09b4"
}
]
}
},
"op": 7
}
Beta Was this translation helpful? Give feedback.
All reactions