-
Notifications
You must be signed in to change notification settings - Fork 8
Open
Description
Alembic doesn't cast Int value to Double on Linux (MacOS its ok).
JSONString:
{"op":"mcm","id":2,"clk":"AKUBANQBAN0B","pt":1505853621577,"mc":[{"id":"1.133562061","rc":[{"bdatb":[[0,3,214.98]],"id":1221386},{"bdatl":[[0,1.49,68.46]],"id":1221385}]}]}
Error:
typeMismatch(expected: Double, actualValue: 3, path: Path([1]))
Code:
struct BDAT: Parsable {
var level: Int
var price: Double
var size: Double
static func value(from json: JSON) throws -> BDAT {
return try .init(
level: json.value(for: [0]),
price: json.parse(Double.self, for: [1])
size: json.value(for: [2])
)
}
}
I've already tried: json.parse(Double.self, for: [1])
and json.parse(for: [1])
SO: Ubuntu 16.04
Swift: 3.1.1
Metadata
Metadata
Assignees
Labels
No labels