<!-- 
RSS generated by JIRA (8.20.10#820010-sha1:ace47f9899e9ee25d7157d59aa17ab06aee30d3d) at Wed Feb 07 20:55:02 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>[YANGTOOLS-1046] The generated Json is missing a closing curly bracket</title>
                <link>https://jira.opendaylight.org/browse/YANGTOOLS-1046</link>
                <project id="10188" key="YANGTOOLS">yangtools</project>
                    <description>&lt;p&gt;When generating Json with codec.gson.JSONNormalizedNodeStreamWriter,&lt;br/&gt;
 a closing curly bracket is missing. &lt;/p&gt;</description>
                <environment></environment>
        <key id="32233">YANGTOOLS-1046</key>
            <summary>The generated Json is missing a closing curly bracket</summary>
                <type id="10104" iconUrl="https://jira.opendaylight.org/secure/viewavatar?size=xsmall&amp;avatarId=10303&amp;avatarType=issuetype">Bug</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="10001">Won&apos;t Do</resolution>
                                        <assignee username="atriki">Ahmed Triki</assignee>
                                    <reporter username="atriki">Ahmed Triki</reporter>
                        <labels>
                    </labels>
                <created>Mon, 2 Dec 2019 15:36:32 +0000</created>
                <updated>Tue, 3 Dec 2019 17:19:03 +0000</updated>
                            <resolved>Tue, 3 Dec 2019 17:19:03 +0000</resolved>
                                                    <fixVersion>3.0.6</fixVersion>
                                    <component>codecs</component>
                        <due></due>
                            <votes>0</votes>
                                    <watches>2</watches>
                                                                                                                <comments>
                            <comment id="67508" author="rovarga" created="Mon, 2 Dec 2019 22:30:30 +0000"  >&lt;p&gt;What version, what are the steps to reproduce?&lt;/p&gt;</comment>
                            <comment id="67513" author="atriki" created="Tue, 3 Dec 2019 16:55:55 +0000"  >&lt;p&gt;I am using the method  createJsonStringFromDataObject (below) to generate json from DataObject. The version of  org.opendaylight.yangtools/odl-yangtools-codec is 3.0.6.&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-object&quot;&gt;String&lt;/span&gt; createJsonStringFromDataObject(&lt;span class=&quot;code-keyword&quot;&gt;final&lt;/span&gt; InstanceIdentifier&amp;lt;?&amp;gt; id, DataObject object) &lt;span class=&quot;code-keyword&quot;&gt;throws&lt;/span&gt; Exception {

        &lt;span class=&quot;code-keyword&quot;&gt;final&lt;/span&gt; SchemaPath scPath = SchemaPath
                .create(FluentIterable.from(id.getPathArguments()).transform(&lt;span class=&quot;code-keyword&quot;&gt;new&lt;/span&gt; Function&amp;lt;PathArgument, QName&amp;gt;() {
                    @Override
                    &lt;span class=&quot;code-keyword&quot;&gt;public&lt;/span&gt; QName apply(&lt;span class=&quot;code-keyword&quot;&gt;final&lt;/span&gt; PathArgument input) {
                        &lt;span class=&quot;code-keyword&quot;&gt;return&lt;/span&gt; BindingReflections.findQName(input.getType());
                    }
                }), &lt;span class=&quot;code-keyword&quot;&gt;true&lt;/span&gt;);
        &lt;span class=&quot;code-keyword&quot;&gt;final&lt;/span&gt; Writer writer = &lt;span class=&quot;code-keyword&quot;&gt;new&lt;/span&gt; StringWriter();
        NormalizedNodeStreamWriter domWriter;

        &lt;span class=&quot;code-keyword&quot;&gt;try&lt;/span&gt; {
            &lt;span class=&quot;code-comment&quot;&gt;// Prepare the variables
&lt;/span&gt;            &lt;span class=&quot;code-keyword&quot;&gt;final&lt;/span&gt; ModuleInfoBackedContext moduleContext = ModuleInfoBackedContext.create();
            Iterable&amp;lt;? &lt;span class=&quot;code-keyword&quot;&gt;extends&lt;/span&gt; YangModuleInfo&amp;gt; moduleInfos = Collections
                    .singleton(BindingReflections.getModuleInfo(object.getClass()));
            moduleContext.addModuleInfos(moduleInfos);
            SchemaContext schemaContext = moduleContext.tryToCreateSchemaContext().get();
            BindingRuntimeContext bindingContext;
            bindingContext = BindingRuntimeContext.create(moduleContext, schemaContext);
            &lt;span class=&quot;code-keyword&quot;&gt;final&lt;/span&gt; BindingNormalizedNodeCodecRegistry codecRegistry =
                &lt;span class=&quot;code-keyword&quot;&gt;new&lt;/span&gt; BindingNormalizedNodeCodecRegistry(bindingContext);

            /*
             * This function needs : - context - scPath.getParent() -
             * scPath.getLastComponent().getNamespace(), -
             * JsonWriterFactory.createJsonWriter(writer)
             */
            domWriter = JSONNormalizedNodeStreamWriter.createExclusiveWriter(
                JSONCodecFactorySupplier.DRAFT_LHOTKA_NETMOD_YANG_JSON_02.createSimple(schemaContext),
                scPath.getParent(), scPath.getLastComponent().getNamespace(),
                JsonWriterFactory.createJsonWriter(writer, 2));
            &lt;span class=&quot;code-comment&quot;&gt;// The write part
&lt;/span&gt;            &lt;span class=&quot;code-keyword&quot;&gt;final&lt;/span&gt; BindingStreamEventWriter bindingWriter = codecRegistry.newWriter(id, domWriter);
            codecRegistry.getSerializer(id.getTargetType()).serialize(object, bindingWriter);
            writer.close();
        } &lt;span class=&quot;code-keyword&quot;&gt;catch&lt;/span&gt; (IOException e) {
            LOG.error(&lt;span class=&quot;code-quote&quot;&gt;&quot; writer error &quot;&lt;/span&gt;);
        } &lt;span class=&quot;code-keyword&quot;&gt;catch&lt;/span&gt; (YangSyntaxErrorException e) {
            LOG.warn(&lt;span class=&quot;code-quote&quot;&gt;&quot;exception {} occured during json file creation&quot;&lt;/span&gt;, e.getMessage(), e);
        } &lt;span class=&quot;code-keyword&quot;&gt;catch&lt;/span&gt; (ReactorException e) {
            LOG.warn(&lt;span class=&quot;code-quote&quot;&gt;&quot; exception {} occured during json file creation&quot;&lt;/span&gt;, e.getMessage(), e);
        }
        &lt;span class=&quot;code-keyword&quot;&gt;return&lt;/span&gt; writer.toString();
    }
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;</comment>
                            <comment id="67514" author="rovarga" created="Tue, 3 Dec 2019 17:18:23 +0000"  >&lt;p&gt;Right, you need to close domWriter.&lt;/p&gt;</comment>
                    </comments>
                <issuelinks>
                            <issuelinktype id="10003">
                    <name>Relates</name>
                                            <outwardlinks description="relates to">
                                        <issuelink>
            <issuekey id="32021">YANGTOOLS-1029</issuekey>
        </issuelink>
                            </outwardlinks>
                                                        </issuelinktype>
                    </issuelinks>
                <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|i03q8v:</customfieldvalue>

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