toggle JSON escaped chars?
Having trouble installing Oxygen? Got a bug to report? Post it all here.
-
- Posts: 43
- Joined: Tue Jul 26, 2016 6:31 pm
toggle JSON escaped chars?
Dear oxygen team,
I have some JSON files that include xml strings within them.
To conform to JSON the XML strings have been heavily escaped.
How can I quickly and conveniently toggle back and forth between JSON-escaped string and XML string, so that I can edit as XML and/JSON?
I have some JSON files that include xml strings within them.
To conform to JSON the XML strings have been heavily escaped.
How can I quickly and conveniently toggle back and forth between JSON-escaped string and XML string, so that I can edit as XML and/JSON?
-
- Posts: 2879
- Joined: Tue May 17, 2005 4:01 pm
Re: toggle JSON escaped chars?
Hi,
The JSON editor from Oxygen does not have specialized actions in this regard. It is however possible to do this with the help of an XML document, since the XML editor that can easily escape/unescape chars.
What you can do is:
1. In the JSON document select and copy to clipboard the escaped XML content.
2. Create a new XML document (File > New > XML) and paste the escaped XML content there.
3. In the XML document, select all the escaped XML content, right click on the selection and use the action Source > Unescape Selection... (make sure the appropriate options are checked)
4. In the XML document, edit as XML as you like.
5. When/If you want to put it back in the JSON document, select the entire content you need in the XML document and use the action Source > Escape Selection...
6. Copy the escaped content from the XML document and put it back in the JSON document.
Regards,
Adrian
The JSON editor from Oxygen does not have specialized actions in this regard. It is however possible to do this with the help of an XML document, since the XML editor that can easily escape/unescape chars.
What you can do is:
1. In the JSON document select and copy to clipboard the escaped XML content.
2. Create a new XML document (File > New > XML) and paste the escaped XML content there.
3. In the XML document, select all the escaped XML content, right click on the selection and use the action Source > Unescape Selection... (make sure the appropriate options are checked)
4. In the XML document, edit as XML as you like.
5. When/If you want to put it back in the JSON document, select the entire content you need in the XML document and use the action Source > Escape Selection...
6. Copy the escaped content from the XML document and put it back in the JSON document.
Regards,
Adrian
Adrian Buza
<oXygen/> XML Editor, Schema Editor and XSLT Editor/Debugger
http://www.oxygenxml.com
<oXygen/> XML Editor, Schema Editor and XSLT Editor/Debugger
http://www.oxygenxml.com
-
- Posts: 43
- Joined: Tue Jul 26, 2016 6:31 pm
Re: toggle JSON escaped chars?
Thanks Adrian,
the problem is that the escape characters work for JSON, not XML - they are not XML entities, but JSON "entities" like.
I guess that oxygen doesn't do JSON excaping?
the problem is that the escape characters work for JSON, not XML - they are not XML entities, but JSON "entities" like
Code: Select all
",{}[]
I guess that oxygen doesn't do JSON excaping?
-
- Posts: 2879
- Joined: Tue May 17, 2005 4:01 pm
Re: toggle JSON escaped chars?
Hi,
No, there is no JSON escaping in Oxygen. Only XML-escaping.
I've logged a feature request for this (JSON escaping) on our issue tracking tool. For reference it is issue EXM-39319.
We will notify this thread when it is implemented.
Regards,
Adrian
No, there is no JSON escaping in Oxygen. Only XML-escaping.
I've logged a feature request for this (JSON escaping) on our issue tracking tool. For reference it is issue EXM-39319.
We will notify this thread when it is implemented.
Regards,
Adrian
Adrian Buza
<oXygen/> XML Editor, Schema Editor and XSLT Editor/Debugger
http://www.oxygenxml.com
<oXygen/> XML Editor, Schema Editor and XSLT Editor/Debugger
http://www.oxygenxml.com
-
- Posts: 2879
- Joined: Tue May 17, 2005 4:01 pm
Re: toggle JSON escaped chars?
Hi,
Our developers are asking for an example for this (with and without escaping). Could you please provide one?
Regards,
Adrian
Our developers are asking for an example for this (with and without escaping). Could you please provide one?
Regards,
Adrian
Adrian Buza
<oXygen/> XML Editor, Schema Editor and XSLT Editor/Debugger
http://www.oxygenxml.com
<oXygen/> XML Editor, Schema Editor and XSLT Editor/Debugger
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