Preserve JSON Arrays
Oxygen general issues.
-
- Posts: 2
- Joined: Thu Dec 08, 2011 9:06 pm
Preserve JSON Arrays
I have manually created a JSON file but when I open the file up with oxygen and edit it then re-save it converts all array elements with only child element to non array. Take this for example.
{"pages": [{"id": 1}]}
when saved in grid mode will change to
{"pages": {"id": 1}}
This is troublesome b/c it is recreating the structure of the json document which is NOT desired. Is there a way to avoid this?
Thanks in advance.
{"pages": [{"id": 1}]}
when saved in grid mode will change to
{"pages": {"id": 1}}
This is troublesome b/c it is recreating the structure of the json document which is NOT desired. Is there a way to avoid this?
Thanks in advance.
-
- Posts: 9446
- Joined: Fri Jul 09, 2004 5:18 pm
Re: Preserve JSON Arrays
Hi Jason,
You are right in the description of the behavior.
In order to display the JSON in the Grid page we convert it to XML and some of the JSON structure information is lost in this way.
We'll try to add some metadata information and remove this unwanted behavior.
I'll update this thread when the issue gets implemented, hopefully we can fix it before Oxygen 13.2 which will appear in January next year.
Regards,
Radu
You are right in the description of the behavior.
In order to display the JSON in the Grid page we convert it to XML and some of the JSON structure information is lost in this way.
We'll try to add some metadata information and remove this unwanted behavior.
I'll update this thread when the issue gets implemented, hopefully we can fix it before Oxygen 13.2 which will appear in January next year.
Regards,
Radu
Radu Coravu
<oXygen/> XML Editor
http://www.oxygenxml.com
<oXygen/> XML Editor
http://www.oxygenxml.com
-
- Posts: 2
- Joined: Thu Dec 08, 2011 9:06 pm
Re: Preserve JSON Arrays
Radu,
That would be outstanding! We of course have a standard for parsing our files in our application so if the structure is changed our parser breaks. For now what I have done is just add an extraneous element so it forces an array b/c it has 2 elements. Then we just do a check in the parser to see if the last element in the array is invalid, if so just omit it. At least this way we can proceed with the product.
If this gets in the next version that would be great as we are currently on a trial and would like to move forward with a purchase but this would prohibit the purchase since we do not want to always deal with a work around.
Thanks for your timely reply.
Jason
That would be outstanding! We of course have a standard for parsing our files in our application so if the structure is changed our parser breaks. For now what I have done is just add an extraneous element so it forces an array b/c it has 2 elements. Then we just do a check in the parser to see if the last element in the array is invalid, if so just omit it. At least this way we can proceed with the product.
If this gets in the next version that would be great as we are currently on a trial and would like to move forward with a purchase but this would prohibit the purchase since we do not want to always deal with a work around.
Thanks for your timely reply.
Jason
Jump to
- Oxygen XML Editor/Author/Developer
- ↳ Feature Request
- ↳ Common Problems
- ↳ DITA (Editing and Publishing DITA Content)
- ↳ Artificial Intelligence (AI Positron Assistant add-on)
- ↳ 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