Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remote-matching parser tolerates misformed requests #33

Open
buske opened this issue Jul 16, 2015 · 3 comments
Open

Remote-matching parser tolerates misformed requests #33

buske opened this issue Jul 16, 2015 · 3 comments
Assignees

Comments

@buske
Copy link
Member

buske commented Jul 16, 2015

The parsing appears to be tolerant of deviations from the MME API in two ways:

  1. Trailing commas appears to be tolerated, e.g.:
"features": [{...}, {...}, ]
                         ^
  1. the "genes" property is allowed to be a string, rather than enforcing it as an object. E.g., the following is currently tolerated:
    {"gene": "SRCAP"}

while the following is currently required by the v1.0 spec:
{"gene": {"id": "SRCAP"}}

This caused confusion while trying to test a request against another service. It validated against localhost, but caused errors against the other service.

(see #34)

@sdumitriu
Copy link
Member

Trailing commas are allowed by the JS specification, but not by the official JSON specification, so that might be considered a bug. Although it might be considered the other way around, an imperfection in the old JSON specification, which should be rectified, but that won't happen anytime soon.

@buske
Copy link
Member Author

buske commented Jul 16, 2015

Okay, I didn't realize it was allowed by JS. If it's easy to fix, I say we fix it to side with the JSON spec. If not, we can probably leave it and just resolved point 2).

@allasm
Copy link
Member

allasm commented Jul 17, 2015

I did not realize this was already being discussed in an issue in this repository and created a duplicate #34. The genetic part of the issue will be fixed there.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

3 participants