[Developers] query API - overuse and sanctions?

Vishal Talwar vishal at metaweb.com
Sat May 9 06:24:22 UTC 2009


> > > Unfortunately, this query is not valid JSON: it includes the same
> > > property name twice, which means that cannot be parsed into object form.

I'm not taking the "cannot be parsed" part seriously. From what Kurt said it's obvious that the common JSON libraries parse this just fine and aren't very strict about the obvious error. While it may not be valid in the strictest sense (as defined by the RFC or what have you), even JSONLint considers 

{
    "a": 1,
    "a": 2
}

valid JSON. It doesn't even give a warning. This seems to be the consistent behaviour across parsers and interpreters alike. I might be wrong but this seems like the only non-syntactical JSON error there is.

> This makes me think that the MQL engine inside Freebase isn't
> even seeing the mangled query, and thus this is a real Freebase bug.

This is a good question for the MQL experts. In my opinion this isn't a mangled query, nor is MQL's behaviour a bug (it's just responding correctly to the query it thinks it's gotten), but my opinion could be plain wrong, so some other Metawebber should weigh in.

Vishal


More information about the Developers mailing list