<p dir="auto">This PR adds JSON format support to the user's GPX files API endpoint, enhancing the API's flexibility and consistency with other endpoints that already support JSON responses. The implementation:</p>
<ul dir="auto">
<li>Adds JSON format handling to the traces controller</li>
<li>Creates a JSON view template matching the XML structure</li>
<li>Ensures proper content type headers are set<br>
This enhancement improves client-side parsing efficiency while maintaining backward compatibility with the existing XML format.</li>
</ul>

<hr>

<h4>You can view, comment on, or merge this pull request online at:</h4>
<p>  <a href='https://github.com/openstreetmap/openstreetmap-website/pull/5779'>https://github.com/openstreetmap/openstreetmap-website/pull/5779</a></p>

<h4>Commit Summary</h4>
<ul>
  <li><a href="https://github.com/openstreetmap/openstreetmap-website/pull/5779/commits/28cb26faa17d2c5df1b5bb8ec8ec5c34e6e0c7da" class="commit-link">28cb26f</a>  adding json</li>
  <li><a href="https://github.com/openstreetmap/openstreetmap-website/pull/5779/commits/ad8483b6256445de4a8699a83421795ab38643e5" class="commit-link">ad8483b</a>  Merge branch 'master' of https://github.com/Satya900/openstreetmap-website</li>
</ul>

<h4 style="display: inline-block">File Changes </h4> <p style="display: inline-block">(<a href="https://github.com/openstreetmap/openstreetmap-website/pull/5779/files">2 files</a>)</p>
<ul>
  <li>
    <strong>M</strong>
    <a href="https://github.com/openstreetmap/openstreetmap-website/pull/5779/files#diff-9e84a5a560427679e0207f400191b13c846b2ed6f99dbd272c0130922bc5d848">app/controllers/api/users/traces_controller.rb</a>
    (5)
  </li>
  <li>
    <strong>A</strong>
    <a href="https://github.com/openstreetmap/openstreetmap-website/pull/5779/files#diff-6dd63ba68792653fd57c3e2dd791d00b153338604db2e968527eb4857eb79844">app/views/api/users/traces/index.json.jbuilder</a>
    (17)
  </li>
</ul>

<h4>Patch Links:</h4>
<ul>
  <li><a href='https://github.com/openstreetmap/openstreetmap-website/pull/5779.patch'>https://github.com/openstreetmap/openstreetmap-website/pull/5779.patch</a></li>
  <li><a href='https://github.com/openstreetmap/openstreetmap-website/pull/5779.diff'>https://github.com/openstreetmap/openstreetmap-website/pull/5779.diff</a></li>
</ul>

<p style="font-size:small;-webkit-text-size-adjust:none;color:#666;">—<br />Reply to this email directly, <a href="https://github.com/openstreetmap/openstreetmap-website/pull/5779">view it on GitHub</a>, or <a href="https://github.com/notifications/unsubscribe-auth/AAK2OLMIG2VOCSD6SGANADT2TMK7XAVCNFSM6AAAAABYTGLG7OVHI2DSMVQWIX3LMV43ASLTON2WKOZSHEYDIOBZGAZDQMI">unsubscribe</a>.<br />You are receiving this because you are subscribed to this thread.<img src="https://github.com/notifications/beacon/AAK2OLK5XWDVTDLGWOXBC4L2TMK7XA5CNFSM6AAAAABYTGLG7OWGG33NNVSW45C7OR4XAZNFJFZXG5LFVJRW63LNMVXHIX3JMTHK2JI3VE.gif" height="1" width="1" alt="" /><span style="color: transparent; font-size: 0; display: none; visibility: hidden; overflow: hidden; opacity: 0; width: 0; height: 0; max-width: 0; max-height: 0; mso-hide: all">Message ID: <span><openstreetmap/openstreetmap-website/pull/5779</span><span>@</span><span>github</span><span>.</span><span>com></span></span></p>
<script type="application/ld+json">[
{
"@context": "http://schema.org",
"@type": "EmailMessage",
"potentialAction": {
"@type": "ViewAction",
"target": "https://github.com/openstreetmap/openstreetmap-website/pull/5779",
"url": "https://github.com/openstreetmap/openstreetmap-website/pull/5779",
"name": "View Pull Request"
},
"description": "View this Pull Request on GitHub",
"publisher": {
"@type": "Organization",
"name": "GitHub",
"url": "https://github.com"
}
}
]</script>