<!-- 
RSS generated by JIRA (8.20.10#820010-sha1:ace47f9899e9ee25d7157d59aa17ab06aee30d3d) at Wed Feb 07 20:08:29 UTC 2024

It is possible to restrict the fields that are returned in this document by specifying the 'field' parameter in your request.
For example, to request only the issue key and summary append 'field=key&field=summary' to the URL of your request.
-->
<rss version="0.92" >
<channel>
    <title>OpenDaylight JIRA</title>
    <link>https://jira.opendaylight.org</link>
    <description>This file is an XML representation of an issue</description>
    <language>en-us</language>    <build-info>
        <version>8.20.10</version>
        <build-number>820010</build-number>
        <build-date>22-06-2022</build-date>
    </build-info>


<item>
            <title>[MDSAL-39] Provide utility service which will convert Java Generated DTO to JSON</title>
                <link>https://jira.opendaylight.org/browse/MDSAL-39</link>
                <project id="10137" key="MDSAL">mdsal</project>
                    <description>&lt;p&gt;See comments below for some amount of guidance. As a first cut, we want to transcode information based on InstanceIdentifier + DataObject. The implementation needs to use mdsal-binding-dom-codec-api facilities to transcode the DataObject to a NormalizedNode and then turn that into a JSON string.&lt;/p&gt;

&lt;p&gt;Once we have a prototype we can then evolve it to more effecient transcoding, including stream setup pipelines.&lt;/p&gt;</description>
                <environment>&lt;p&gt;Operating System: Windows&lt;br/&gt;
Platform: PC&lt;/p&gt;</environment>
        <key id="26861">MDSAL-39</key>
            <summary>Provide utility service which will convert Java Generated DTO to JSON</summary>
                <type id="10103" iconUrl="https://jira.opendaylight.org/secure/viewavatar?size=xsmall&amp;avatarId=10311&amp;avatarType=issuetype">New Feature</type>
                                                <status id="10003" iconUrl="https://jira.opendaylight.org/images/icons/status_generic.gif" description="">Confirmed</status>
                    <statusCategory id="2" key="new" colorName="blue-gray"/>
                                    <resolution id="-1">Unresolved</resolution>
                                        <assignee username="-1">Unassigned</assignee>
                                    <reporter username="tony.tkacik@gmail.com">Tony Tkacik</reporter>
                        <labels>
                            <label>pick-next</label>
                            <label>pt</label>
                    </labels>
                <created>Mon, 14 Jul 2014 08:13:43 +0000</created>
                <updated>Tue, 9 Jan 2024 17:20:06 +0000</updated>
                                                            <fixVersion>14.0.0</fixVersion>
                    <fixVersion>13.0.1</fixVersion>
                                    <component>Binding API</component>
                    <component>Binding runtime</component>
                        <due></due>
                            <votes>0</votes>
                                    <watches>5</watches>
                                                                                                                <comments>
                            <comment id="53973" author="tony.tkacik@gmail.com" created="Wed, 16 Jul 2014 11:10:24 +0000"  >&lt;p&gt;What you want to do is implement an service with signature&lt;/p&gt;

&lt;p&gt;JSONCodec extends BindingCodec&amp;lt;String,DataObject&amp;gt; {&lt;/p&gt;

&lt;p&gt;      String serialize(DataObject);&lt;br/&gt;
      DataObject deserialize(String);&lt;br/&gt;
}&lt;/p&gt;

&lt;p&gt;Which will:&lt;br/&gt;
 use BindingIndependentMappingService to get conversion from Binding DTOs&lt;br/&gt;
 to DOM nodes and then integrate with JSON Codec (which is currently in sal-  restconf-connector and should be probably externalized to separate bundle),&lt;br/&gt;
which is responsible for writing DOM nodes to JSON.&lt;/p&gt;

&lt;p&gt;So basicly your service is integration of two services:&lt;br/&gt;
Binding -&amp;gt; DOM (BindingIndependentMappingService)&lt;br/&gt;
DOM -&amp;gt; JSON (which should have stream api, and maybe support multiple writer implementations (GSon, Jackson).&lt;/p&gt;

&lt;p&gt;BindingIndependentMappingService is available via Config subsystem and OSGI registry, but not directly via MD-SAL.&lt;/p&gt;</comment>
                            <comment id="53974" author="tony.tkacik@gmail.com" created="Thu, 17 Jul 2014 07:12:19 +0000"  >&lt;p&gt;DOM to XML is converted using XMLDocumentUtils and same utility functions&lt;br/&gt;
could be found in restconf-util in YANGTOols project.&lt;/p&gt;</comment>
                            <comment id="53975" author="aslanimina@gmail.com" created="Sun, 10 Aug 2014 21:03:43 +0000"  >&lt;p&gt;(In reply to Tony Tkacik from comment #1)&lt;br/&gt;
&amp;gt; What you want to do is implement an service with signature&lt;br/&gt;
&amp;gt; &lt;br/&gt;
&amp;gt; JSONCodec extends BindingCodec&amp;lt;String,DataObject&amp;gt; &lt;/p&gt;
{
&amp;gt; 
&amp;gt;       String serialize(DataObject);
&amp;gt;       DataObject deserialize(String);
&amp;gt; }
&lt;p&gt;&amp;gt;&lt;br/&gt;
&amp;gt; Which will:&lt;br/&gt;
&amp;gt;  use BindingIndependentMappingService to get conversion from Binding DTOs&lt;br/&gt;
&amp;gt;  to DOM nodes and then integrate with JSON Codec (which is currently in sal-&lt;br/&gt;
&amp;gt; restconf-connector and should be probably externalized to separate bundle),&lt;br/&gt;
&amp;gt; which is responsible for writing DOM nodes to JSON.&lt;br/&gt;
&amp;gt; &lt;br/&gt;
&amp;gt; So basicly your service is integration of two services:&lt;br/&gt;
&amp;gt; Binding -&amp;gt; DOM (BindingIndependentMappingService)&lt;br/&gt;
&amp;gt; DOM -&amp;gt; JSON (which should have stream api, and maybe support multiple writer&lt;br/&gt;
&amp;gt; implementations (GSon, Jackson).&lt;br/&gt;
&amp;gt; &lt;br/&gt;
&amp;gt; BindingIndependentMappingService is available via Config subsystem and OSGI&lt;br/&gt;
&amp;gt; registry, but not directly via MD-SAL.&lt;/p&gt;


&lt;p&gt;The following service:&lt;br/&gt;
DOM -&amp;gt; JSON&lt;/p&gt;

&lt;p&gt;should be implemented getting idea from XMLDocumentUtils.&lt;/p&gt;

&lt;p&gt;And also JsonCodec has the following two parts when serializes:&lt;/p&gt;

&lt;ul class=&quot;alternate&quot; type=&quot;square&quot;&gt;
	&lt;li&gt;Binding -&amp;gt; DOM (BindingIndependentMappingService)&lt;/li&gt;
	&lt;li&gt;DOM -&amp;gt; JSON (JSONDocumentUtils)&lt;/li&gt;
&lt;/ul&gt;


&lt;p&gt;public class JSONCodec implements BindingCodec&amp;lt;String,DataObject&amp;gt;  {&lt;/p&gt;

&lt;p&gt;    private BindingIndependentMappingService mappingService;&lt;/p&gt;

&lt;p&gt;	public String serialize(DataObject dataObject) &lt;/p&gt;
{
		CompositeNode node = mappingService.toDataDom(dataObject);
		.....
        }

&lt;p&gt;	public DataObject deserialize(String str) &lt;/p&gt;
{ 
		.....
	}</comment>
                            <comment id="53976" author="aslanimina@gmail.com" created="Sun, 10 Aug 2014 21:59:06 +0000"  >&lt;p&gt;(In reply to Mina Aslani from comment #3)&lt;br/&gt;
&amp;gt; (In reply to Tony Tkacik from comment #1)&lt;br/&gt;
&amp;gt; &amp;gt; What you want to do is implement an service with signature&lt;br/&gt;
&amp;gt; &amp;gt; &lt;br/&gt;
&amp;gt; &amp;gt; JSONCodec extends BindingCodec&amp;lt;String,DataObject&amp;gt; &lt;/p&gt;
{
&amp;gt; &amp;gt; 
&amp;gt; &amp;gt;       String serialize(DataObject);
&amp;gt; &amp;gt;       DataObject deserialize(String);
&amp;gt; &amp;gt; }
&lt;p&gt;&amp;gt; &amp;gt;&lt;br/&gt;
&amp;gt; &amp;gt; Which will:&lt;br/&gt;
&amp;gt; &amp;gt;  use BindingIndependentMappingService to get conversion from Binding DTOs&lt;br/&gt;
&amp;gt; &amp;gt;  to DOM nodes and then integrate with JSON Codec (which is currently in sal-&lt;br/&gt;
&amp;gt; &amp;gt; restconf-connector and should be probably externalized to separate bundle),&lt;br/&gt;
&amp;gt; &amp;gt; which is responsible for writing DOM nodes to JSON.&lt;br/&gt;
&amp;gt; &amp;gt; &lt;br/&gt;
&amp;gt; &amp;gt; So basicly your service is integration of two services:&lt;br/&gt;
&amp;gt; &amp;gt; Binding -&amp;gt; DOM (BindingIndependentMappingService)&lt;br/&gt;
&amp;gt; &amp;gt; DOM -&amp;gt; JSON (which should have stream api, and maybe support multiple writer&lt;br/&gt;
&amp;gt; &amp;gt; implementations (GSon, Jackson).&lt;br/&gt;
&amp;gt; &amp;gt; &lt;br/&gt;
&amp;gt; &amp;gt; BindingIndependentMappingService is available via Config subsystem and OSGI&lt;br/&gt;
&amp;gt; &amp;gt; registry, but not directly via MD-SAL.&lt;br/&gt;
&amp;gt; &lt;br/&gt;
&amp;gt; &lt;br/&gt;
&amp;gt; The following service:&lt;br/&gt;
&amp;gt; DOM -&amp;gt; JSON&lt;br/&gt;
&amp;gt; &lt;br/&gt;
&amp;gt; should be implemented getting idea from XMLDocumentUtils.&lt;br/&gt;
&amp;gt; &lt;br/&gt;
&amp;gt; And also JsonCodec has the following two parts when serializes:&lt;br/&gt;
&amp;gt; &lt;br/&gt;
&amp;gt; - Binding -&amp;gt; DOM (BindingIndependentMappingService)&lt;br/&gt;
&amp;gt; - DOM -&amp;gt; JSON (JSONDocumentUtils)&lt;br/&gt;
&amp;gt; &lt;br/&gt;
&amp;gt; public class JSONCodec implements BindingCodec&amp;lt;String,DataObject&amp;gt;  {&lt;br/&gt;
&amp;gt; &lt;br/&gt;
&amp;gt;     private BindingIndependentMappingService mappingService;&lt;br/&gt;
&amp;gt; &lt;br/&gt;
&amp;gt; 	public String serialize(DataObject dataObject) &lt;/p&gt;
{
&amp;gt; 		CompositeNode node = mappingService.toDataDom(dataObject);
&amp;gt; 		.....
&amp;gt;         }
&lt;p&gt;&amp;gt;     &lt;br/&gt;
&amp;gt; 	public DataObject deserialize(String str) &lt;/p&gt;
{ 
&amp;gt; 		.....
&amp;gt; 	}


&lt;p&gt;Is this how suggested for the bug to be fixed?&lt;/p&gt;</comment>
                            <comment id="69433" author="rovarga" created="Sat, 24 Jul 2021 19:30:54 +0000"  >&lt;p&gt;Yes, although the IO part of it should provide integration with IO, i.e. write to OutputStream, etc.&lt;/p&gt;</comment>
                    </comments>
                    <attachments>
                    </attachments>
                <subtasks>
                    </subtasks>
                <customfields>
                                                                            <customfield id="customfield_11400" key="com.atlassian.jira.plugins.jira-development-integration-plugin:devsummary">
                        <customfieldname>Development</customfieldname>
                        <customfieldvalues>
                            
                        </customfieldvalues>
                    </customfield>
                                                                                                                        <customfield id="customfield_10208" key="com.atlassian.jira.plugin.system.customfieldtypes:textfield">
                        <customfieldname>External issue ID</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>1360</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                <customfield id="customfield_10201" key="com.atlassian.jira.plugin.system.customfieldtypes:url">
                        <customfieldname>External issue URL</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue><![CDATA[https://bugs.opendaylight.org/show_bug.cgi?id=1360]]></customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                                            <customfield id="customfield_10206" key="com.atlassian.jira.plugin.system.customfieldtypes:select">
                        <customfieldname>Issue Type</customfieldname>
                        <customfieldvalues>
                                <customfieldvalue key="10308"><![CDATA[New Feature]]></customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                                                                                                                                        <customfield id="customfield_10204" key="com.atlassian.jira.plugin.system.customfieldtypes:select">
                        <customfieldname>ODL SR Target Milestone</customfieldname>
                        <customfieldvalues>
                                <customfieldvalue key="10321"><![CDATA[Carbon]]></customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                                                                        <customfield id="customfield_10202" key="com.atlassian.jira.plugin.system.customfieldtypes:select">
                        <customfieldname>Priority</customfieldname>
                        <customfieldvalues>
                                <customfieldvalue key="10304"><![CDATA[Low]]></customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                <customfield id="customfield_10000" key="com.pyxis.greenhopper.jira:gh-lexo-rank">
                        <customfieldname>Rank</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>0|i02vxr:</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                </customfields>
    </item>
</channel>
</rss>