You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I believe that JSON handles mixed content so badly that few people are going to want to convert "narrative" documents to JSON, and we should not distort the design in order to improve the way this case is handled.
I believe it could be a very general requirement to convert XML to JSON as lossless as possible, and to use a representation that at least simplifies converting the data back to XML in a unified way. For those use cases, it could be tedious to exclude all layouts in the function call to enforce the use of the mixed layout.
I believe that JSON handles mixed content so badly that few people are going to want to convert "narrative" documents to JSON
I am not so sure about that. I am aware of at least one use case in which TEI data is converted to JsonML (and back to XML later on). It is not related to the work that @dariok discussed on Slack and in #1592.
Even though the function may not be used primarily for mixed content, we should make it easier to convert such XML input to maps/JSON.
If I understand correctly, the safest solution to retrieve a consistent result currently is:
Maybe we can simplify this? If we had an inclusive option, it could possibly be:
We could also consider
xml:space=''preserve
attributes and applymixed
to all descendant nodes (but it shouldn't be the only solution).Related: #1592
The text was updated successfully, but these errors were encountered: