[openstreetmap/openstreetmap-website] Implement JSON support for the changeset download API (PR #5973)
Kyℓe Hensel
notifications at github.com
Thu May 1 11:15:53 UTC 2025
@k-yle commented on this pull request.
> @@ -0,0 +1,7 @@
+json.partial! "api/root_attributes"
+
+json.osmChange do
+ json.create @created.map { |elt| JSON.parse(render(partial: "api/#{elt.to_partial_path}", object: elt)) }
+ json.modify @modified.map { |elt| JSON.parse(render(partial: "api/#{elt.to_partial_path}", object: elt)) }
+ json.delete @deleted.map { |elt| JSON.parse(render(partial: "api/#{elt.to_partial_path}", object: elt)) }
any suggestions how to do it more efficiently? I experimented with jbuilder's `.merge` but couldn't find a solution
--
Reply to this email directly or view it on GitHub:
https://github.com/openstreetmap/openstreetmap-website/pull/5973#discussion_r2070163342
You are receiving this because you are subscribed to this thread.
Message ID: <openstreetmap/openstreetmap-website/pull/5973/review/2809623655 at github.com>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openstreetmap.org/pipermail/rails-dev/attachments/20250501/da190ca8/attachment.htm>
More information about the rails-dev
mailing list