You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@daffodil.apache.org by "Steve Lawrence (Jira)" <ji...@apache.org> on 2022/01/10 15:34:00 UTC

[jira] [Commented] (DAFFODIL-2621) Add doc of DFDL-Infoset to JSON conversion to web site

    [ https://issues.apache.org/jira/browse/DAFFODIL-2621?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17472104#comment-17472104 ] 

Steve Lawrence commented on DAFFODIL-2621:
------------------------------------------

We use the the FasterXML-Jackon JsonStringEncoder to escape strings:

[https://javadoc.io/static/com.fasterxml.jackson.core/jackson-core/2.13.1/com/fasterxml/jackson/core/io/JsonStringEncoder.html#quoteAsString-java.lang.String-]

Which uses "JSON standard escaping"

[https://github.com/apache/daffodil/blob/main/daffodil-runtime1/src/main/scala/org/apache/daffodil/infoset/JsonInfosetOutputter.scala#L106]

> Add doc of DFDL-Infoset to JSON conversion to web site
> ------------------------------------------------------
>
>                 Key: DAFFODIL-2621
>                 URL: https://issues.apache.org/jira/browse/DAFFODIL-2621
>             Project: Daffodil
>          Issue Type: Improvement
>          Components: Documentation
>    Affects Versions: 3.2.1
>            Reporter: Mike Beckerle
>            Priority: Major
>
> We have page [https://daffodil.apache.org/infoset/]
> which describes the XML Illegal Characters approach for parsing with output to XML.
> We have no such corresponding documentation for JSON.
> JSON is definitely different. For example in JSON strings cannot span line boundaries, so you cannot have line ending characters within strings without escaping them (e.g., "\n"). 
> Presumably, as we output legal JSON, we do this. But it's not described anywhere.



--
This message was sent by Atlassian Jira
(v8.20.1#820001)