Hi,

Ahh, I remember hitting the same problem when I was first looking at the 
browser binding implementation. 

At the time I was mistakenly requesting the whole repository’s type definition 
and had put it down to that being the problem i.e. the response was too large.

Those particular properties are declared as double in the Alfresco content 
model, however, min and max values are not provided so something in our stack 
is rendering the minValue and maxValue properties as Double.MIN_VALUE and 
Double.MAX_VALUE respectively. It sounds like this could be related to 
CMIS-751/CMIS-753. I will raise an issue internally about this too.

In the meantime, this is going to be a tricky one to workaround if it takes out 
the parser. It doesn’t look like there are any magic options on 
NSJSONSerialization that will help either :-( There is an “isValidJSONObject” 
method but if that works that’s only going to allow us to avoid the parsing 
error.

Regards,

Gavin



On 24 Apr 2014, at 14:39, Sutter, Peter <[email protected]> wrote:

> 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

Reply via email to