<!-- 
RSS generated by JIRA (8.20.10#820010-sha1:ace47f9899e9ee25d7157d59aa17ab06aee30d3d) at Wed Feb 07 19:53:07 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>[CONTROLLER-477] Add trailing newline to formatted JSON output</title>
                <link>https://jira.opendaylight.org/browse/CONTROLLER-477</link>
                <project id="10113" key="CONTROLLER">controller</project>
                    <description>&lt;p&gt;Currently there&apos;s no trailing newline to formatted JSON output.  This can be annoying when using command-line tools to interact with the REST API.&lt;/p&gt;

&lt;p&gt;Though there&apos;s also something to be said for &lt;em&gt;not&lt;/em&gt; pretty-printing the output by default also since this increases the size of the messages.&lt;/p&gt;

&lt;p&gt;Workaround is something like feeding the output into a JSON formatter such as python -mjson.tool.&lt;/p&gt;</description>
                <environment>&lt;p&gt;Operating System: Linux&lt;br/&gt;
Platform: PC&lt;/p&gt;</environment>
        <key id="25031">CONTROLLER-477</key>
            <summary>Add trailing newline to formatted JSON output</summary>
                <type id="10100" iconUrl="https://jira.opendaylight.org/secure/viewavatar?size=xsmall&amp;avatarId=10310&amp;avatarType=issuetype">Improvement</type>
                                                <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="jgloncak">Jozef Gloncak</assignee>
                                    <reporter username="readams">Rob Adams</reporter>
                        <labels>
                    </labels>
                <created>Wed, 14 May 2014 23:43:53 +0000</created>
                <updated>Tue, 14 Nov 2017 15:18:00 +0000</updated>
                            <resolved>Mon, 7 Jul 2014 11:24:15 +0000</resolved>
                                    <version>Helium</version>
                                                    <component>restconf</component>
                        <due></due>
                            <votes>0</votes>
                                    <watches>8</watches>
                                                                                                                <comments>
                            <comment id="48330" author="devin.avery@brocade.com" created="Thu, 29 May 2014 13:40:25 +0000"  >&lt;p&gt;I personally would argue that the response should NOT be pretty-printed and it should be up to the receiver to format the results. When you get large, nested outputs, whitespace can add up to be a significant portion of the result.&lt;/p&gt;

&lt;p&gt;With that said, we could add a header argument / query param which would optionally pretty-format the result if provided. &lt;/p&gt;

&lt;p&gt;==&lt;/p&gt;

&lt;p&gt;My proposal - Best of both worlds - by default do NOT pretty-print the output, but allow for either a query param or header value (query param is probably easier) which pretty-prints the response content in the server before return it to the caller.&lt;/p&gt;

&lt;p&gt;This will increase usability for developers relying on command line tools etc.&lt;/p&gt;

&lt;p&gt;Thoughts?&lt;/p&gt;</comment>
                            <comment id="48331" author="tpantelis" created="Thu, 29 May 2014 20:34:15 +0000"  >&lt;p&gt;The RESTCONF draft does define a &quot;format&quot; query parameter:&lt;/p&gt;

&lt;p&gt;   The &quot;format&quot; parameter is used to specify the format of any content&lt;br/&gt;
   returned in the response.  Note that this parameter MAY be used&lt;br/&gt;
   instead of the &quot;Accept&quot; header to identify the format desired in the&lt;br/&gt;
   response.&lt;/p&gt;

&lt;p&gt;   The &quot;format&quot; parameter is only supported for the GET and HEAD&lt;br/&gt;
   methods.  It is supported for all RESTCONF media types.&lt;/p&gt;

&lt;p&gt;        syntax: format= xml | json&lt;/p&gt;

&lt;p&gt;Although the draft doesn&apos;t mention about pretty-printing, we could use &quot;format&quot; to indicate pretty-printed output (as an extension to the draft).&lt;/p&gt;</comment>
                            <comment id="48332" author="readams@readams.net" created="Thu, 29 May 2014 20:46:24 +0000"  >&lt;p&gt;I&apos;m fine with never pretty-printing or with doing it from a config option in a config file somewhere.  I think the bug about formatting errors as JSON is fixed now so the &quot;pipe curl into python -mjson.tool&quot; works just fine.&lt;/p&gt;</comment>
                            <comment id="48333" author="jgloncak" created="Wed, 25 Jun 2014 12:02:07 +0000"  >&lt;p&gt;patch set was proposed&lt;br/&gt;
&lt;a href=&quot;https://git.opendaylight.org/gerrit/#/c/8329&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://git.opendaylight.org/gerrit/#/c/8329&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;if in URI is specified parameter includeWhiteChars=false then no white characters will be present in JSON|XML output.&lt;/p&gt;

&lt;p&gt;if includeWhiteChars is omitted or contains any other value, the white characters will be present in output.&lt;/p&gt;</comment>
                            <comment id="48334" author="jgloncak" created="Thu, 26 Jun 2014 08:02:16 +0000"  >&lt;p&gt;Comment from patch set:&lt;br/&gt;
&amp;gt;&amp;gt;&amp;gt;&amp;gt;&lt;br/&gt;
Rob Adams&lt;br/&gt;
First, it should be called prettyPrint not includeWhiteSpaces.&lt;/p&gt;

&lt;p&gt;Second the default should be &lt;em&gt;not&lt;/em&gt; to pretty print. So change to prettyPrint=true. The normal operational mode would be to not pretty print, and it&apos;s silly to require all calls to the REST API to pass this extra parameter in normal operation.&lt;br/&gt;
&amp;lt;&amp;lt;&amp;lt;&amp;lt;&lt;/p&gt;

&lt;p&gt;patch set 3 was proposed&lt;/p&gt;
&lt;ul class=&quot;alternate&quot; type=&quot;square&quot;&gt;
	&lt;li&gt;URI parameter was renamed to prettyPrint&lt;/li&gt;
	&lt;li&gt;behaviour was changed:&lt;/li&gt;
	&lt;li&gt;- if prettyPrint=true - output is pretty printed&lt;/li&gt;
	&lt;li&gt;- other cases - output isn&apos;t pretty printed.&lt;/li&gt;
&lt;/ul&gt;


&lt;p&gt;&lt;a href=&quot;https://git.opendaylight.org/gerrit/#/c/8329&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://git.opendaylight.org/gerrit/#/c/8329&lt;/a&gt;&lt;/p&gt;</comment>
                            <comment id="48335" author="jgloncak" created="Mon, 30 Jun 2014 11:43:40 +0000"  >&lt;p&gt;patch set 4 was uploaded. parameter of type UriInfo was added to signatures of method which were specified by Devin Avery&lt;/p&gt;</comment>
                            <comment id="48336" author="jgloncak" created="Tue, 1 Jul 2014 05:36:17 +0000"  >&lt;p&gt;patch set which add UriInfo input parameter to once more missing method&lt;/p&gt;</comment>
                            <comment id="48337" author="jgloncak" created="Fri, 4 Jul 2014 06:23:37 +0000"  >&lt;p&gt;patch set 8 which solve conflicts with current master was uploaded.&lt;/p&gt;</comment>
                    </comments>
                <issuelinks>
                            <issuelinktype id="10000">
                    <name>Blocks</name>
                                            <outwardlinks description="blocks">
                                        <issuelink>
            <issuekey id="24841">CONTROLLER-287</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_10208" key="com.atlassian.jira.plugin.system.customfieldtypes:textfield">
                        <customfieldname>External issue ID</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>1016</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=1016]]></customfieldvalue>

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

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