We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Swift 3.1, Ubuntu 16.04
md5: 16c574ff67fde808bbc831290032b61b
is duplicated by:
relates to:
Issue Description:
Sample code:
import Foundation let a: UInt8 = 1 let arr = [a, a, a] print("Is array of UInt8 valid JSON? \(JSONSerialization.isValidJSONObject(arr))")
Tested on 3.1. On Ubuntu 16.04, it prints `Is array of UInt8 valid JSON? false`. On OSX, it prints `Is array of UInt8 valid JSON? true`.
The text was updated successfully, but these errors were encountered:
Comment by Alec O'Connor (JIRA)
This is the case for other types as well. Including CGFloats
Sorry, something went wrong.
I think you have to manually create NSNumbers to be cross-platform compatible in Swift 3.1. Right, @phausler?
This looks fixed in 4.1.3:
$ ~/swift-4.1.3-RELEASE-ubuntu16.04/usr/bin/swift Welcome to Swift version 4.1.3 (swift-4.1.3-RELEASE). Type :help for assistance. 1> import Foundation 2. 3. let a: UInt8 = 1 4. let arr = [a, a, a] 5. 6. print("Is array of UInt8 valid JSON? \(JSONSerialization.isValidJSONObject(arr))") Is array of UInt8 valid JSON? true
No branches or pull requests
Environment
Swift 3.1, Ubuntu 16.04
Additional Detail from JIRA
md5: 16c574ff67fde808bbc831290032b61b
is duplicated by:
relates to:
Issue Description:
Sample code:
Tested on 3.1.
On Ubuntu 16.04, it prints `Is array of UInt8 valid JSON? false`.
On OSX, it prints `Is array of UInt8 valid JSON? true`.
The text was updated successfully, but these errors were encountered: