<!-- 
RSS generated by JIRA (9.4.2#940002-sha1:46d1a51de284217efdcb32434eab47a99af2938b) at Mon Feb 12 01:11:24 CET 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>Magnolia - Issue tracker</title>
    <link>https://jira.magnolia-cms.com</link>
    <description>This file is an XML representation of an issue</description>
    <language>en-uk</language>    <build-info>
        <version>9.4.2</version>
        <build-number>940002</build-number>
        <build-date>19-01-2023</build-date>
    </build-info>


<item>
            <title>[DOCU-678] Document how to create a json-provider using magnolia templating</title>
                <link>https://jira.magnolia-cms.com/browse/DOCU-678</link>
                <project id="10190" key="DOCU">Documentation</project>
                    <description>&lt;p&gt;Rest module provides out of the box rest endpoints and the abilty to define custom endpoints. &lt;/p&gt;

&lt;p&gt;But there is another technique that customers use which is to use a page template to output json (or maybe xml as well) instead of html. &lt;br/&gt;
Key advantage is that a template writer uses all the same skills and techniques to effectively create a rest endpoint. They just write the script to output the json format instead of html.&lt;br/&gt;
Im not sure what other configuration is necessary, but I know Tomas has employed this technique.&lt;br/&gt;
Also it is written about in this blog post:&lt;br/&gt;
&lt;a href=&quot;https://www.magnolia-cms.com/blogs/jan-haderka/detail~@json--rest--magnolia-and-the-creation-of-end-points-without-writing-a-single-line-of-java~.html&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://www.magnolia-cms.com/blogs/jan-haderka/detail~@json--rest--magnolia-and-the-creation-of-end-points-without-writing-a-single-line-of-java~.html&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;There are other advantages - such as you dont need to setup additional security to get it to work.&lt;br/&gt;
And translation typically works out of the box.&lt;/p&gt;</description>
                <environment></environment>
        <key id="50446">DOCU-678</key>
            <summary>Document how to create a json-provider using magnolia templating</summary>
                <type id="14" iconUrl="https://jira.magnolia-cms.com/secure/viewavatar?size=xsmall&amp;avatarId=10895&amp;avatarType=issuetype">Story</type>
                                            <priority id="6" iconUrl="https://jira.magnolia-cms.com/images/icons/priorities/neutral.gif">Neutral</priority>
                        <status id="6" iconUrl="https://jira.magnolia-cms.com/images/icons/statuses/closed.png" description="The issue is considered finished, the resolution is correct. Issues which are not closed can be reopened.">Closed</status>
                    <statusCategory id="3" key="done" colorName="success"/>
                                    <resolution id="11">Done</resolution>
                                        <assignee username="cmeier">Christoph Meier</assignee>
                                    <reporter username="czimmermann">Christopher Zimmermann</reporter>
                        <labels>
                    </labels>
                <created>Wed, 24 Feb 2016 09:26:37 +0100</created>
                <updated>Tue, 29 May 2018 11:04:46 +0200</updated>
                            <resolved>Mon, 28 May 2018 17:56:15 +0200</resolved>
                                                                        <due></due>
                            <votes>0</votes>
                                    <watches>2</watches>
                                                                                                                <comments>
                            <comment id="121281" author="cmeier" created="Wed, 24 Feb 2016 16:19:46 +0100"  >&lt;p&gt;Theoretically i got the point.&lt;br/&gt;
So, it is about producing json or xml by just using freemarker - which allows to have kind of custom-endpoint replacement without any java. In a &quot;real world example&quot; i never ever would do that just with freemarker. (Instead i would use neat-jsonfn at 1st place and freemarker with a java model on 2nd place.)&lt;br/&gt;
But, okay, if it is a high-level goal to do things without Java - &lt;tt&gt;creating custom-endpoint replacement with freemarker only&lt;/tt&gt; makes sense.&lt;/p&gt;



</comment>
                            <comment id="121282" author="czimmermann" created="Wed, 24 Feb 2016 16:31:17 +0100"  >&lt;p&gt;Yeah - I would just explain the basic principle that a template can output json.&lt;br/&gt;
And then build on that with an example of simple ftl.&lt;br/&gt;
And then build on that with the &lt;b&gt;option&lt;/b&gt; to create a model class.&lt;/p&gt;</comment>
                            <comment id="121283" author="czimmermann" created="Wed, 24 Feb 2016 16:31:41 +0100"  >&lt;p&gt;I would ask Tomas about the other differences to REST module endpoints - ie security and translation. But missing the rest-tools support that the REST module provides.&lt;/p&gt;</comment>
                            <comment id="135759" author="cmeier" created="Fri, 2 Dec 2016 02:24:06 +0100"  >&lt;p&gt;Since &lt;tt&gt;jsonfn&lt;/tt&gt; comes closer and closer to the product moving into the Magnolia repo too - now i even more believe that jsonfn is the way to go.&lt;br/&gt;
However, a page &lt;tt&gt;Creating a json-provider using magnolia templating&lt;/tt&gt; still makes a lot of sense, but it will recommend using jsonfn and just a few tiny bits hot to do it without jsonfn, etc. pp.&lt;br/&gt;
I highly guess everybody who ever was creating template based json providers would i agree.&lt;/p&gt;</comment>
                            <comment id="142435" author="cmeier" created="Tue, 25 Apr 2017 06:40:28 +0200"  >&lt;p&gt;&lt;a href=&quot;https://jira.magnolia-cms.com/secure/ViewProfile.jspa?name=czimmermann&quot; class=&quot;user-hover&quot; rel=&quot;czimmermann&quot;&gt;czimmermann&lt;/a&gt;, as you have seen &lt;a href=&quot;https://documentation.magnolia-cms.com/display/DOCS/jsonfn&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;jsonfn docs&lt;/a&gt; are out now.&lt;br/&gt;
Besides that, i know that PM / PD is planning to improve the REST API.&lt;br/&gt;
That&apos;s why i wonder whether this ticket is still valid.&lt;br/&gt;
-&lt;br/&gt;
However, i still would have  few nice ideas and hints for an LD-only json-provider &lt;img class=&quot;emoticon&quot; src=&quot;https://jira.magnolia-cms.com/images/icons/emoticons/smile.png&quot; height=&quot;16&quot; width=&quot;16&quot; align=&quot;absmiddle&quot; alt=&quot;&quot; border=&quot;0&quot;/&gt; - which could be summarized on a page.&lt;/p&gt;</comment>
                            <comment id="142443" author="czimmermann" created="Tue, 25 Apr 2017 09:25:39 +0200"  >&lt;p&gt;Good question, but yes this ticket is still valid. I think it could be addressed without too much actual text. jsonfn ref is useful. REST api docs are useful. But I see the need for an overview of the whole topic - mentioning the different approaches and when you would use them. &lt;br/&gt;
Even once the new REST is available, I think there may still be use cases for jsonfn and this approach.&lt;br/&gt;
For example: Jan S. and Tomas have an interesting approach with a component that has two templates - one for first load and HTML, and a variant one for generating the json required for the component.&lt;/p&gt;</comment>
                            <comment id="142444" author="czimmermann" created="Tue, 25 Apr 2017 09:26:43 +0200"  >&lt;p&gt;Good that you raise this because we should have this in place in time for Q3 marketing theme. (july 1 at the latest)&lt;/p&gt;</comment>
                            <comment id="142502" author="cmeier" created="Wed, 26 Apr 2017 06:18:57 +0200"  >&lt;p&gt;&lt;a href=&quot;https://jira.magnolia-cms.com/secure/ViewProfile.jspa?name=czimmermann&quot; class=&quot;user-hover&quot; rel=&quot;czimmermann&quot;&gt;czimmermann&lt;/a&gt; atm rather needs what is filed in &lt;a href=&quot;https://jira.magnolia-cms.com/browse/DOCU-1006&quot; title=&quot;Overview &amp;quot;How to get json&amp;quot; &quot; class=&quot;issue-link&quot; data-issue-key=&quot;DOCU-1006&quot;&gt;&lt;del&gt;DOCU-1006&lt;/del&gt;&lt;/a&gt;.&lt;br/&gt;
This ticket (&lt;a href=&quot;https://jira.magnolia-cms.com/browse/DOCU-678&quot; title=&quot;Document how to create a json-provider using magnolia templating&quot; class=&quot;issue-link&quot; data-issue-key=&quot;DOCU-678&quot;&gt;&lt;del&gt;DOCU-678&lt;/del&gt;&lt;/a&gt;) now has a really low prio. Very well possible that it will be closed as obsolete, let&apos;s see.&lt;/p&gt;</comment>
                            <comment id="161249" author="cmeier" created="Mon, 28 May 2018 17:56:12 +0200"  >&lt;p&gt;I would say that&apos;s now tackled with &lt;a href=&quot;https://documentation.magnolia-cms.com/display/DOCS56/How+to+get+content+as+JSON+-+an+overview&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://documentation.magnolia-cms.com/display/DOCS56/How+to+get+content+as+JSON+-+an+overview&lt;/a&gt;&lt;br/&gt;
So I close this (again?).&lt;/p&gt;</comment>
                            <comment id="161299" author="czimmermann" created="Tue, 29 May 2018 11:04:46 +0200"  >&lt;p&gt;Definitely. thumbs up.&lt;/p&gt;</comment>
                    </comments>
                <issuelinks>
                            <issuelinktype id="10020">
                    <name>dependency</name>
                                            <outwardlinks description="depends upon">
                                                        </outwardlinks>
                                                        </issuelinktype>
                    </issuelinks>
                <attachments>
                    </attachments>
                <subtasks>
                    </subtasks>
                <customfields>
                                                                            <customfield id="customfield_14166" key="com.okapya.jira.checklist:checklist">
                        <customfieldname>Acceptance criteria</customfieldname>
                        <customfieldvalues>
                            
        <checklist>
        <![CDATA[
                            




                
                                    <div class="o-completion" style="display: flex; flex-shrink: 0;"><span  class="aui-lozenge aui-lozenge-complete" style="font-size: 12px; font-weight: normal; display: flex; flex-direction: row; align-items: center;" ><span style="padding-right: 4px; vertical-align: middle;"><svg width="15" height="15" viewBox="0 0 15 15" xmlns="http://www.w3.org/2000/svg" fill="white"><path clip-rule="evenodd" d="m10.41037,3.42544l-7.86501,0c-0.72395,0 -1.31084,0.58688 -1.31084,1.31084l0,7.86508c0,0.7239 0.58689,1.3108 1.31084,1.3108l7.86501,0c0.724,0 1.3109,-0.5869 1.3109,-1.3108l0,-7.86508c0,-0.72396 -0.5869,-1.31084 -1.3109,-1.31084zm-7.86501,-0.65542c-1.08593,0 -1.96626,0.88032 -1.96626,1.96626l0,7.86508c0,1.0859 0.88033,1.9662 1.96626,1.9662l7.86501,0c1.086,0 1.9663,-0.8803 1.9663,-1.9662l0,-7.86508c0,-1.08594 -0.8803,-1.96626 -1.9663,-1.96626l-7.86501,0z" fill-rule="evenodd"/><path d="m5.09049,10.18526l-1.82767,-1.82766l-0.78479,0.78479l2.61246,2.61246l5.38758,-5.38754l-0.78483,-0.78479l-4.60275,4.60274z"/></svg></span><span>Empty</span></span></div>
                        ]]>
    </checklist>


                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                <customfield id="customfield_10111" key="com.atlassian.jira.toolkit:reporterdomain">
                        <customfieldname>Company</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>magnolia-cms.com</customfieldvalue>
                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                <customfield id="customfield_10031" key="com.atlassian.jira.ext.charting:firstresponsedate">
                        <customfieldname>Date of First Response</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>Wed, 24 Feb 2016 16:19:46 +0100</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                <customfield id="customfield_12730" key="com.atlassian.jira.plugins.jira-development-integration-plugin:devsummary">
                        <customfieldname>Development</customfieldname>
                        <customfieldvalues>
                            
                        </customfieldvalues>
                    </customfield>
                                                                <customfield id="customfield_14151" key="com.atlassian.jira.toolkit:message">
                        <customfieldname>Docu info</customfieldname>
                        <customfieldvalues>
                            
                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            <customfield id="customfield_10061" key="com.atlassian.jira.toolkit:lastusercommented">
                        <customfieldname>Last comm is not jira-dev</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>true</customfieldvalue>
                        </customfieldvalues>
                    </customfield>
                                                                <customfield id="customfield_10071" key="com.atlassian.jira.toolkit:lastupdaterorcommenter">
                        <customfieldname>Last participant</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>czimmermann</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                <customfield id="customfield_13136" key="com.atlassian.jira.toolkit:LastCommentDate">
                        <customfieldname>Last public comment date</customfieldname>
                        <customfieldvalues>
                            5 years, 37 weeks, 5 days ago
                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                            <customfield id="customfield_10020" key="com.atlassian.jira.toolkit:attachments">
                        <customfieldname>Number of attachments</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>0.0</customfieldvalue>
                        </customfieldvalues>
                    </customfield>
                                                                <customfield id="customfield_10150" key="com.atlassian.jira.toolkit:comments">
                        <customfieldname>Number of comments</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>10.0</customfieldvalue>
                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        <customfield id="customfield_10011" key="com.atlassian.jira.toolkit:participants">
                        <customfieldname>Participants</customfieldname>
                        <customfieldvalues>
                                        <customfieldvalue>czimmermann</customfieldvalue>
            <customfieldvalue>cmeier</customfieldvalue>
    
                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                                                                                <customfield id="customfield_10833" key="com.pyxis.greenhopper.jira:gh-lexo-rank">
                        <customfieldname>Rank</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>0|hzzzk5:zxzzt9</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                <customfield id="customfield_10244" key="com.pyxis.greenhopper.jira:gh-global-rank">
                        <customfieldname>Rank (Obsolete)</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>9223372036854775807</customfieldvalue>
                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    <customfield id="customfield_14145" key="com.intenso.jira.issue-templates:issue-templates-customfield">
                        <customfieldname>Template</customfieldname>
                        <customfieldvalues>
                            


                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                            <customfield id="customfield_15131" key="com.onresolve.jira.groovy.groovyrunner:scripted-field">
                        <customfieldname>Time in Discovery</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>0</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                <customfield id="customfield_10032" key="com.atlassian.jira.ext.charting:timeinstatus">
                        <customfieldname>Time in Status</customfieldname>
                        <customfieldvalues>
                            
                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        </customfields>
    </item>
</channel>
</rss>