<!-- 
RSS generated by JIRA (8.20.10#820010-sha1:ace47f9899e9ee25d7157d59aa17ab06aee30d3d) at Wed Feb 07 20:05:19 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>[JSONRPC-18] Add support for invocation of RPC method with object argument</title>
                <link>https://jira.opendaylight.org/browse/JSONRPC-18</link>
                <project id="10132" key="JSONRPC">jsonrpc</project>
                    <description>&lt;p&gt;Messagelib currently support only scalar method argument types.&lt;/p&gt;

&lt;p&gt;It is possible to add support for them.&lt;/p&gt;

&lt;p&gt;Consider this POJO&lt;/p&gt;

&lt;p&gt;&#160;&lt;/p&gt;
&lt;div class=&quot;code panel&quot; style=&quot;border-width: 1px;&quot;&gt;&lt;div class=&quot;codeContent panelContent&quot;&gt;
&lt;pre class=&quot;code-java&quot;&gt;
&lt;span class=&quot;code-keyword&quot;&gt;public&lt;/span&gt; &lt;span class=&quot;code-keyword&quot;&gt;class &lt;/span&gt;SomePojo {
&#160;&#160;&#160; &lt;span class=&quot;code-keyword&quot;&gt;private&lt;/span&gt; &lt;span class=&quot;code-object&quot;&gt;int&lt;/span&gt; field1;
&#160;&#160;&#160; &lt;span class=&quot;code-keyword&quot;&gt;private&lt;/span&gt; &lt;span class=&quot;code-object&quot;&gt;String&lt;/span&gt; field2;
&#160;&#160;&#160; &lt;span class=&quot;code-comment&quot;&gt;// + getters/setters
&lt;/span&gt;}&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;
&lt;p&gt;&#160;&lt;/p&gt;

&lt;p&gt;And this RPC method&lt;/p&gt;

&lt;p&gt;&#160;&lt;/p&gt;
&lt;div class=&quot;code panel&quot; style=&quot;border-width: 1px;&quot;&gt;&lt;div class=&quot;codeContent panelContent&quot;&gt;
&lt;pre class=&quot;code-java&quot;&gt;
&lt;span class=&quot;code-keyword&quot;&gt;public&lt;/span&gt; &lt;span class=&quot;code-keyword&quot;&gt;interface&lt;/span&gt; SomeRpc {
&#160;&#160;&#160; Result callMe(SomePojo input);
}&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;
&lt;p&gt;&#160;&lt;/p&gt;

&lt;p&gt;This RPC method can be invoked like this:&lt;/p&gt;
&lt;div class=&quot;code panel&quot; style=&quot;border-width: 1px;&quot;&gt;&lt;div class=&quot;codeContent panelContent&quot;&gt;
&lt;pre class=&quot;code-java&quot;&gt;
{&lt;span class=&quot;code-quote&quot;&gt;&quot;jsonrpc&quot;&lt;/span&gt;:&lt;span class=&quot;code-quote&quot;&gt;&quot;2.0&quot;&lt;/span&gt;,&lt;span class=&quot;code-quote&quot;&gt;&quot;id&quot;&lt;/span&gt;:2,&lt;span class=&quot;code-quote&quot;&gt;&quot;method&quot;&lt;/span&gt;:&lt;span class=&quot;code-quote&quot;&gt;&quot;callMe&quot;&lt;/span&gt;,&lt;span class=&quot;code-quote&quot;&gt;&quot;params&quot;&lt;/span&gt;:{&lt;span class=&quot;code-quote&quot;&gt;&quot;field1&quot;&lt;/span&gt;:10,&lt;span class=&quot;code-quote&quot;&gt;&quot;field2&quot;&lt;/span&gt;:&lt;span class=&quot;code-quote&quot;&gt;&quot;ABC&quot;&lt;/span&gt;}}&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;
&lt;p&gt;&#160;&lt;/p&gt;

&lt;p&gt;Also it is possible to exploit GSON feature to add explicit mapping of parameter name to java field name. Let&apos;s say you have parameters named &quot;field-1&quot; and &quot;field-2&quot;&lt;/p&gt;
&lt;div class=&quot;code panel&quot; style=&quot;border-width: 1px;&quot;&gt;&lt;div class=&quot;codeContent panelContent&quot;&gt;
&lt;pre class=&quot;code-java&quot;&gt;
{&lt;span class=&quot;code-quote&quot;&gt;&quot;jsonrpc&quot;&lt;/span&gt;:&lt;span class=&quot;code-quote&quot;&gt;&quot;2.0&quot;&lt;/span&gt;,&lt;span class=&quot;code-quote&quot;&gt;&quot;id&quot;&lt;/span&gt;:2,&lt;span class=&quot;code-quote&quot;&gt;&quot;method&quot;&lt;/span&gt;:&lt;span class=&quot;code-quote&quot;&gt;&quot;callMe&quot;&lt;/span&gt;,&lt;span class=&quot;code-quote&quot;&gt;&quot;params&quot;&lt;/span&gt;:{&lt;span class=&quot;code-quote&quot;&gt;&quot;field-1&quot;&lt;/span&gt;:10,&lt;span class=&quot;code-quote&quot;&gt;&quot;field-2&quot;&lt;/span&gt;:&lt;span class=&quot;code-quote&quot;&gt;&quot;ABC&quot;&lt;/span&gt;}}&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;
&lt;p&gt;Now you can specify json field name using annotation `SerializedName`:&lt;/p&gt;

&lt;p&gt;&#160;&lt;/p&gt;
&lt;div class=&quot;code panel&quot; style=&quot;border-width: 1px;&quot;&gt;&lt;div class=&quot;codeContent panelContent&quot;&gt;
&lt;pre class=&quot;code-java&quot;&gt;
&lt;span class=&quot;code-keyword&quot;&gt;import&lt;/span&gt; com.google.gson.annotations.SerializedName;
&lt;span class=&quot;code-keyword&quot;&gt;public&lt;/span&gt; &lt;span class=&quot;code-keyword&quot;&gt;class &lt;/span&gt;SomePojo {
&#160;&#160;&#160; @SerializedName(&lt;span class=&quot;code-quote&quot;&gt;&quot;field-1&quot;&lt;/span&gt;)&#160;&#160;&#160; 
    &lt;span class=&quot;code-keyword&quot;&gt;private&lt;/span&gt; &lt;span class=&quot;code-object&quot;&gt;int&lt;/span&gt; field1;
&#160;&#160;&#160; 
    @SerializedName(&lt;span class=&quot;code-quote&quot;&gt;&quot;field-2&quot;&lt;/span&gt;)
&#160;&#160;&#160; &lt;span class=&quot;code-keyword&quot;&gt;private&lt;/span&gt; &lt;span class=&quot;code-object&quot;&gt;String&lt;/span&gt; field2;&#160;&#160;&#160; 
    &lt;span class=&quot;code-comment&quot;&gt;// + getters/setters
&lt;/span&gt;}
&#160;
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;
&lt;p&gt;&#160;&lt;/p&gt;

&lt;p&gt;&#160;&lt;/p&gt;

&lt;p&gt;&#160;&lt;/p&gt;</description>
                <environment></environment>
        <key id="29432">JSONRPC-18</key>
            <summary>Add support for invocation of RPC method with object argument</summary>
                <type id="10100" iconUrl="https://jira.opendaylight.org/secure/viewavatar?size=xsmall&amp;avatarId=10310&amp;avatarType=issuetype">Improvement</type>
                                            <priority id="3" iconUrl="https://jira.opendaylight.org/images/icons/priorities/major.svg">Medium</priority>
                        <status id="5" iconUrl="https://jira.opendaylight.org/images/icons/statuses/resolved.png" description="A resolution has been taken, and it is awaiting verification by reporter. From here issues are either reopened, or are closed.">Resolved</status>
                    <statusCategory id="3" key="done" colorName="green"/>
                                    <resolution id="10000">Done</resolution>
                                        <assignee username="rkosegi">Richard Kosegi</assignee>
                                    <reporter username="rkosegi">Richard Kosegi</reporter>
                        <labels>
                    </labels>
                <created>Fri, 16 Mar 2018 08:08:02 +0000</created>
                <updated>Fri, 23 Mar 2018 19:59:11 +0000</updated>
                            <resolved>Fri, 23 Mar 2018 19:59:11 +0000</resolved>
                                                                        <due></due>
                            <votes>0</votes>
                                    <watches>1</watches>
                                                                                                                        <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_10000" key="com.pyxis.greenhopper.jira:gh-lexo-rank">
                        <customfieldname>Rank</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>0|i03bq7:</customfieldvalue>

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