[Developers] Scientific notation in MQL

Warren Harris warren at metaweb.com
Tue Jul 21 21:15:16 UTC 2009


Hi Phil,

I created https://bugs.freebase.com/browse/ME-1419 to address this  
problem.

Warren


On Jul 21, 2009, at 1:54 PM, Philip Kendall wrote:

> Is it a known issue that scientific notation is not supported in  
> MQL? My
> reading of the JSON spec is that it should be (and it's certainly  
> given
> as an example at <http://mql.freebaseapps.com/ch02.html#typefloat>),  
> but
> yet...
>
> {
>  "id":   "/en/philip_kendall",
>  "type": "/people/person",
>  "height_meters": {
>    "connect": "update",
>    "value":   1e4
>  }
> }
>
> returns
>
> {
>  "code":          "/api/status/error",
>  "messages": [{
>    "code":    "/api/status/error/mql/type",
>    "info": {
>      "expected_type": "/type/float",
>      "property":      "e4"
>    },
>    "message": "Type /type/float does not have property e4",
>    "path":    "height_meters",
>    "query": {
>      "height_meters": {
>        "connect":      "update",
>        "e4":           null,
>        "error_inside": ".",
>        "value":        1
>      },
>      "id":   "/en/philip_kendall",
>      "type": "/people/person"
>    }
>  }],
>  "status":        "200 OK",
>  "transaction_id":  
> "cache;cache01.sandbox.sjc1:8101;2009-07-21T20:47:36Z;0008"
> }
>
> having trashed the 1e4 parameter along the way. (I haven't tried  
> this on
> the production graph).
>
> Cheers,
>
> Phil
>
> -- 
>  Philip Kendall <philip at shadowmagic.org.uk>
>  http://www.shadowmagic.org.uk/
> _______________________________________________
> Developers mailing list
> Developers at freebase.com
> http://lists.freebase.com/mailman/listinfo/developers



More information about the Developers mailing list