<book xmlns="http://docbook.org/ns/docbook" xmlns:xl="http://www.w3.org/1999/xlink" version="5.0">
    <title>CP-1920</title>
    <subtitle>Padding in DICOM JSON Model</subtitle>
    <chapter>
        <title></title>
        <informaltable rules="all" frame="box">
            <tr>
                <td rowspan="1" colspan="1" valign="top"><para>Status</para></td>
                <td rowspan="1" colspan="1" valign="top"><para>November 2019 Voting Packet</para></td>
            </tr>
            <tr>
                <td rowspan="1" colspan="1" valign="top"><para>Date of Last Update</para></td>
                <td rowspan="1" colspan="1" valign="top"><para>2019/10/27</para></td>
            </tr>
            <tr>
                <td rowspan="1" colspan="1" valign="top"><para>Person Assigned</para></td>
                <td rowspan="1" colspan="1" valign="top"><para>David Clunie</para><para><link
                    xl:href="mailto:dclunie@dclunie.com"/></para></td>
            </tr>
            <tr>
                <td rowspan="1" colspan="1" valign="top"><para>Submitter Name</para></td>
                <td rowspan="1" colspan="1" valign="top"><para>Jim Philbin</para><para><link
                    xl:href="mailto:jim@philbin.us"/></para></td>
            </tr>
            <tr>
                <td rowspan="1" colspan="1" valign="top"><para>Submission Date</para></td>
                <td rowspan="1" colspan="1" valign="top"><para>2018/11/08</para></td>
            </tr>
        </informaltable>
        <informaltable rules="all" frame="box">
            <tr>
                <td rowspan="1" colspan="1" valign="top"><para>Correction Number CP-1920</para></td>
            </tr>
            <tr>
                <td rowspan="1" colspan="1" valign="top"><para>Log Summary: Padding in DICOM JSON and XML (Native) Models</para></td>
            </tr>
            <tr>
                <td rowspan="1" colspan="1" valign="top">
                    <para>Name of Standard</para>
                    <para>PS3.18, PS3.19</para>
                </td>
            </tr>
            <tr>
                <td rowspan="1" colspan="1" valign="top"><para>Rationale for Correction:</para>
                    <para>JSON does not pad value fields. Clarify this and make consistent with XML rules from PS3.19.</para>
                </td>
            </tr>
            <tr>
                <td rowspan="1" colspan="1" valign="top">Correction Wording:</td>
            </tr>
        </informaltable>
    </chapter>
    <chapter>
        <title/>

      <informaltable rules="all" frame="box">
        <tr>
          <td>
            <para><emphasis role="italic">Amend DICOM PS3.18 as follows (changes to existing text are bold and <emphasis role="bold"><emphasis role="underline">underlined</emphasis></emphasis> for additions and <emphasis role="bold"><emphasis role="strikethrough">struckthrough</emphasis></emphasis> for removals):</emphasis></para>
          </td>
        </tr>
      </informaltable>
        
        <section label="F.1" status="2" xml:id="sect_F.1">
            <title>Introduction to JavaScript Object Notation (JSON)</title>
            <para xml:id="para_0ae6e059-ed41-42bc-bbc6-ec6214fefa37">JSON is a text-based open standard, derived from JavaScript, for representing data structures and associated arrays. It is language-independent, and primarily used for serializing and transmitting lightweight structured data over a network connection. It is described in detail by the Internet Engineering Task Force (IETF) in <xref linkend="biblio_RFC_4627"/>, available at <link xl:href="http://www.ietf.org/rfc/rfc4627.txt"/>.</para>
            <para xml:id="para_838562fa-2db9-4202-b072-6accb6d91852">The DICOM JSON Model complements the XML-based Native DICOM Model, by providing a lightweight representation of data returned by DICOM web services. While this representation can be used to encode any type of DICOM Data Set it is expected to be used by client applications, especially mobile clients, such as described in the QIDO-RS use cases (see <olink targetdoc="PS3.17" targetptr="chapter_HHH" xrefstyle="template:Annex %n “%t” in PS3.17"/>).</para>
            <para><emphasis role="bold"><emphasis role="underline">With the exception of padding to even byte length, a data source that is creating a new instance of a DICOM JSON Model shall follow the DICOM encoding rules in creating Values for the DICOM Attributes within the instance of the DICOM JSON Model. Attribute Values encoded in a DICOM JSON Model are not required to be padded to an even byte length.</emphasis></emphasis></para>
            <para><emphasis role="bold"><emphasis role="underline">A data recipient that converts data from an instance of the DICOM JSON Model back into a binary encoded DICOM object shall adjust the padding<emphasis role="bold"><emphasis role="underline"> to an even byte length</emphasis></emphasis> as necessary to meet the encoding rules specified in DICOM <olink targetdoc="PS3.5" targetptr="PS3.5" xrefstyle="select: labelnumber"/>.</emphasis></emphasis></para>
        </section>
        
        
        
        
        
        <informaltable rules="all" frame="box">
            <tr>
                <td>
                    <para><emphasis role="italic">Amend DICOM PS3.19 as follows (changes to existing text are bold and <emphasis role="bold"><emphasis role="underline">underlined</emphasis></emphasis> for additions and <emphasis role="bold"><emphasis role="strikethrough">struckthrough</emphasis></emphasis> for removals):</emphasis></para>
                </td>
            </tr>
        </informaltable>
        
        
        <section label="A.1.1" status="3" xml:id="sect_A.1.1">
            <title>Usage</title>
            <para xml:id="para_70a6281c-dd00-4724-9b6c-4349e9a347b3">The Native DICOM Model defines a representation of binary-encoded DICOM SOP Instances as XML Infosets that allows a recipient of data to navigate through a binary DICOM data set using XML-based tools instead of relying on tool kits that understand the binary encoding of DICOM.</para>
            <note>
                <para xml:id="para_94007198-f168-4973-b2f4-12b7a636e4f6">It is not the intention that this form be utilized as the basis for other uses. This form does not take advantage of the self-validation features that could be possible with a pure XML representation of the data.</para>
            </note>
            <para xml:id="para_a8115fff-75ff-415c-ab58-0ea9147bb66a">With the exception of padding<emphasis role="bold"><emphasis role="underline"> to an even byte length</emphasis></emphasis>, a data source that is creating a new instance of a Native DICOM Model (e.g., the result from some analysis application) shall follow the DICOM encoding rules (e.g., the handling of character sets) in creating Values for the DicomAttributes within the instance of the Native DICOM Model. <emphasis role="bold"><emphasis role="underline">Attribute Values encoded in a Native DICOM Model are not required to be padded to an even byte length.</emphasis></emphasis></para>
            <para xml:id="para_7dc8dcaf-f53d-49cd-8570-4d9993788825">Group Length (gggg,0000) attributes shall not be included in a Native DICOM Model instance.</para>
            <para xml:id="para_8d20e0b7-09d7-44b4-841a-7ad8690364e0">A data recipient that converts data from an instance of the Native DICOM Model back into a binary encoded DICOM object shall adjust the padding<emphasis role="bold"><emphasis role="underline"> to an even byte length</emphasis></emphasis> as necessary to meet the encoding rules specified in DICOM <olink targetdoc="PS3.5" targetptr="PS3.5" xrefstyle="select: labelnumber"/>.</para>
        </section>
          
        
         
    </chapter>
</book>
