chemistry-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Sutter, Peter" <peter.sut...@sap.com>
Subject Browser Binding & NSJSONSerialization error with double max: Number wound up as NaN around character xyz
Date Thu, 24 Apr 2014 13:39:26 GMT
Hi,

when executing the request against the alfresco server: http://ec2-54-195-83-189.eu-west-1.compute.amazonaws.com/alfresco/api/-default-/public/cmis/versions/1.1/browser?cmisselector=typeDefinition&typeId=P:exif:exif

I get the following response (note the minValue and maxValue):
<snipped start>
"exif:fNumber":{"minValue":0.0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000049,"maxValue":179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000,"id":"exif:fNumber","localName":"fNumber","localNamespace":"http:\/\/www.alfresco.org\/model\/exif\/1.0","displayName":"F
Number","queryName":"exif:fNumber","description":"F Number","propertyType":"decimal","cardinality":"single","updatability":"readwrite","inherited":false,"required":false,"queryable":true,"orderable":true},"exif:focalLength":{"minValue":0.0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000049,"maxValue":179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000,"id":"exif:focalLength","localName":"focalLength","localNamespace":"http:\/\/www.alfresco.org\/model\/exif\/1.0","displayName":"Focal
Length”,
<snipped end>

here a bit better formatted:

exif:fNumber: {
minValue: 5e-324
maxValue: 1.7976931348623157e+308
id: "exif:fNumber"
localName: "fNumber"
localNamespace: "http://www.alfresco.org/model/exif/1.0"
displayName: "F Number"
queryName: "exif:fNumber"
description: "F Number"
propertyType: "decimal"
cardinality: "single"
updatability: "readwrite"
inherited: false
required: false
queryable: true
orderable: true
}
-

exif:focalLength: {
minValue: 5e-324
maxValue: 1.7976931348623157e+308
id: "exif:focalLength"
localName: "focalLength"
localNamespace: "http://www.alfresco.org/model/exif/1.0"
displayName: "Focal Length"
queryName: "exif:focalLength"
description: "Focal length of the lens, in millimeters"
propertyType: "decimal"
cardinality: "single"
updatability: "readwrite"
inherited: false
required: false
queryable: true
orderable: true
}


Now when trying to serialize the json string I get the following error from NSJSONSerialization:
Number wound up as NaN around character 1680. Also found this on stack overflow: http://stackoverflow.com/questions/16156129/nsjsonserialization-fails-on-dbl-max
Seems to be an apple bug..

Best regards,
Peter

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message