JSONSerialization.jsonObject may have a different behavior when using SkipFuse, a crash occurs
Nobody has claimed this yet.
- Dominant language
- Swift
- Stars
- 3.2k
- Forks
- 106
- Avg merge
- 6d 13h
- Merged PRs (30d)
- 1
Description
Hi, trying to run a library using SkipFuse having a JSONSerialization.jsonObject call and casting to any Sendable & Hashable, I get different behavior on iOS and Android. On iOS everything works, but on Android it crashes
import Foundation
var d = """
{"test":{"test":1}}
""".data(using: .utf8)
public typealias JSONTestValue = any Sendable & Hashable
let f = try JSONSerialization.jsonObject(with: d!, options: [])
let g = f as! JSONTestValue
Could not cast value of type 'Swift.Dictionary<Swift.String, Any>' (0xb400006ff7905358) to 'Swift.Hashable' (0xb400006ff7905390).
Fatal signal 6 (SIGABRT), code -1 (SI_QUEUE) in tid 24845
Perhaps of course it's not Skip, but Swift...
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by reproducing the provided Swift example with SkipFuse on both iOS and Android, focusing on JSONSerialization.jsonObject and the any Sendable & Hashable cast. Compare the resulting runtime types and trace whether the discrepancy comes from SkipFuse or the platform behavior. Done means the cause is identified and the crash or its expected behavior is addressed.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- android, ios, swift
- Domain
- mobile-dev
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 38/100