Skip to content

Conversation

@seanpdoyle
Copy link
Contributor

@seanpdoyle seanpdoyle commented Oct 23, 2025

Related to #441

This commit adds the remove_root = true optional argument to the JsonFormat and XmlFormat modules' #decode method. The name and positional argument style draw direct inspiration from the ActiveResource::Base#load method's optional remove_root = true argument.

The change is in support of replacing internal calls to Hash.from_xml and ActiveSupport::JSON.decode. Those method invocations are replaced with the appropriate format's .decode method.

Related to rails#441

This commit also adds the `remove_root = true` optional argument to the
`JsonFormat` and `XmlFormat` modules' `#decode` method. The name and
positional argument style draw direct inspiration from the
`ActiveResource::Base#load` method's optional `remove_root = true`
argument.

The change is in support of replacing internal calls to `Hash.from_xml`
and `ActiveSupport::JSON.decode`. Those method invocations are replaced
with the appropriate format's `.decode` method.
@rafaelfranca rafaelfranca merged commit f95fd4f into rails:main Oct 23, 2025
19 checks passed
@seanpdoyle seanpdoyle deleted the error-parsing-decode branch October 23, 2025 19:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants