JSON Validator not accepting top level arrays.
Oxygen general issues.
-
- Posts: 16
- Joined: Wed May 20, 2009 2:25 pm
JSON Validator not accepting top level arrays.
Moi!
The built-in JSON Validator does not consider top level arrays as valid JSON. Top level arrays may not be the preferred solution, but I believe they are valid JSON. Please check the behavior of the validator.
Br,
Jan
The built-in JSON Validator does not consider top level arrays as valid JSON. Top level arrays may not be the preferred solution, but I believe they are valid JSON. Please check the behavior of the validator.
Br,
Jan
-
- Posts: 16
- Joined: Wed May 20, 2009 2:25 pm
Re: JSON Validator not accepting top level arrays.
Hello Radu!
For example:
or
Gives error:
These are valid according to for example jsonlint.com.
Another thing is that oxygen approves strings that are not wrapped in quotes, so this is considered valid in oxygen:
While jsonlint.com says:
//Jan
For example:
Code: Select all
[
{
"color": "red",
"value": "#f00"
},
{
"color": "green",
"value": "#0f0"
}
]
Code: Select all
[ 100, 500, 300, 200, 400 ]
Code: Select all
E [JSON Validator] A JSONObject text must begin with '{'
Another thing is that oxygen approves strings that are not wrapped in quotes, so this is considered valid in oxygen:
Code: Select all
{
color: "red",
value: "#f00"
}
Code: Select all
Parse error on line 1:
{ color: "red", va
-----^
Expecting 'STRING', '}'
-
- Posts: 9445
- Joined: Fri Jul 09, 2004 5:18 pm
Re: JSON Validator not accepting top level arrays.
Hi Jan,
You're right in both cases, I registered both issues to our internal bugs list and I'll update this forum post with more details when they are implemented.
Regards,
Radu
You're right in both cases, I registered both issues to our internal bugs list and I'll update this forum post with more details when they are implemented.
Regards,
Radu
Radu Coravu
<oXygen/> XML Editor
http://www.oxygenxml.com
<oXygen/> XML Editor
http://www.oxygenxml.com
-
- Posts: 9445
- Joined: Fri Jul 09, 2004 5:18 pm
Re: JSON Validator not accepting top level arrays.
Hi Jan,
In Oxygen 13.1 (which will be available in a couple of weeks) you will be able to validate, format and indent and edit in the Grid page also JSON Arrays.
The other problem (missing quotes to the key not reported as errors) will probably be fixed in a future version.
Regards,
Radu
In Oxygen 13.1 (which will be available in a couple of weeks) you will be able to validate, format and indent and edit in the Grid page also JSON Arrays.
The other problem (missing quotes to the key not reported as errors) will probably be fixed in a future version.
Regards,
Radu
Radu Coravu
<oXygen/> XML Editor
http://www.oxygenxml.com
<oXygen/> XML Editor
http://www.oxygenxml.com
-
- Posts: 9445
- Joined: Fri Jul 09, 2004 5:18 pm
Re: JSON Validator not accepting top level arrays.
Hi,
Just to update this post, this issue:
Regards,
Radu
Just to update this post, this issue:
was fixed in Oxygen 15.0 which should report it as an error.The other problem (missing quotes to the key not reported as errors) will probably be fixed in a future version.
Regards,
Radu
Radu Coravu
<oXygen/> XML Editor
http://www.oxygenxml.com
<oXygen/> XML Editor
http://www.oxygenxml.com
Jump to
- Oxygen XML Editor/Author/Developer
- ↳ Feature Request
- ↳ Common Problems
- ↳ DITA (Editing and Publishing DITA Content)
- ↳ SDK-API, Frameworks - Document Types
- ↳ DocBook
- ↳ TEI
- ↳ XHTML
- ↳ Other Issues
- Oxygen XML Web Author
- ↳ Feature Request
- ↳ Common Problems
- Oxygen Content Fusion
- ↳ Feature Request
- ↳ Common Problems
- Oxygen JSON Editor
- ↳ Feature Request
- ↳ Common Problems
- Oxygen PDF Chemistry
- ↳ Feature Request
- ↳ Common Problems
- Oxygen Feedback
- ↳ Feature Request
- ↳ Common Problems
- Oxygen XML WebHelp
- ↳ Feature Request
- ↳ Common Problems
- XML
- ↳ General XML Questions
- ↳ XSLT and FOP
- ↳ XML Schemas
- ↳ XQuery
- NVDL
- ↳ General NVDL Issues
- ↳ oNVDL Related Issues
- XML Services Market
- ↳ Offer a Service