[openstreetmap/openstreetmap-website] Implement JSON support for the changeset download API (PR #5973)
Marwin Hochfelsner
notifications at github.com
Thu May 1 11:02:40 UTC 2025
@hlfan 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)) }
I don't think having the json serialized, parsed and serialized again is the best way to do this.
--
Reply to this email directly or view it on GitHub:
https://github.com/openstreetmap/openstreetmap-website/pull/5973#pullrequestreview-2809611906
You are receiving this because you are subscribed to this thread.
Message ID: <openstreetmap/openstreetmap-website/pull/5973/review/2809611906 at github.com>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openstreetmap.org/pipermail/rails-dev/attachments/20250501/e33c92d1/attachment.htm>
More information about the rails-dev
mailing list