Fixed Object#as_json and Struct#as_json with options
These methods now takes the same options as Hash#as_json, for example:

    struct = Struct.new(:foo, :bar).new
    struct.foo = "hello"
    struct.bar = "world"
    json = struct.as_json(only: [:foo]) # => {foo: "hello"}

This is extracted from PR #11728 from @sergiocampama, see also the
discussion in #11460.
Merge pull request #12782 from chancancode/fix_object_and_struct_as_json

Fixed Object#as_json and Struct#as_json with options
Fix AS changelog indent, remove tabs and extra spaces [ci skip]
update the AR enum docs to match the actual behavior. [ci skip]
bring back constant to expose the enum mapping as HWIA.