| Summary: | JSON validation shows spurious errors | ||||||
|---|---|---|---|---|---|---|---|
| Product: | [ECD] Orion | Reporter: | Rafael Chaves <rafael> | ||||
| Component: | JS Tools | Assignee: | Project Inbox <orion.client-inbox> | ||||
| Status: | RESOLVED INVALID | QA Contact: | |||||
| Severity: | normal | ||||||
| Priority: | P3 | ||||||
| Version: | 9.0 | ||||||
| Target Milestone: | --- | ||||||
| Hardware: | PC | ||||||
| OS: | Linux | ||||||
| Whiteboard: | |||||||
| Attachments: |
|
||||||
|
Description
Rafael Chaves
Created attachment 256833 [details]
screenshot
This is the JSON source:
{
"blog" : {
"User" : [ {
"name" : "guest"
}, {
"name" : "john"
}, {
"name" : "mary"
} ],
"Article" : [ {
"title" : "A guest post",
"body" : "Just a guest post",
"createdAt" : "2015/09/13",
"user" : "User@1"
}, {
"title" : "John's post",
"body" : "This is John's post.",
"createdAt" : "2015/09/13",
"user" : "User@2"
} ],
"Comment" : [ {
"body" : "c1",
"createdAt" : "2015/09/13",
"article" : "Article@2",
"user" : "User@1"
}, {
"body" : "c2",
"createdAt" : "2015/09/13",
"article" : "Article@2",
"user" : "User@1"
} ]
}
}
Same thing with Orion "10.0.0S10". Chrome 45.0.2454.93 (Official Build) (32-bit) Firefox 40.0.3 Turns out this was my fault. I have a plugin that declares an editor for "data.json" files based on a custom content type. My content type extended the Javascript content type, and that didn't cause problems in 7.0 (maybe didn't do what I wanted either, which was to piggyback on JS syntax highlighting) but in 9.0 causes the content to be validated by the JS validator, producing the unwanted validation problem markers. I changed my custom content type to extend the JSON content type (which I am guessing wasn't available when I first added my own) and now it works like a charm now - I get JSON syntax highlighting and validation (in addition to my own, schema aware, validation). |