[DBIx-Class-Devel] [sql-translator] don't pass non-JSON specific producer_args to to_json (#64)

djerius notifications at github.com
Tue Aug 4 22:16:21 GMT 2015


The producer_args passed by sqlt contains a number of keys which are
not specific to JSON.  These were passed unfiltered to to_json().
JSON (at least as of v2.90) will throw an error if it is passed an
unknown option (it uses the option key as a method name, which leads
to confusing error messages).

It's not straightforward to automatically determine the args supported
by the JSON module, so this simply whitelist the 'pretty', 'indent',
and 'canonical' options.
You can view, comment on, or merge this pull request online at:

  https://github.com/dbsrgits/sql-translator/pull/64

-- Commit Summary --

  * don't pass non-JSON specific producer_args to to_json

-- File Changes --

    M lib/SQL/Translator/Producer/JSON.pm (4)
    M t/23json.t (4)

-- Patch Links --

https://github.com/dbsrgits/sql-translator/pull/64.patch
https://github.com/dbsrgits/sql-translator/pull/64.diff

---
Reply to this email directly or view it on GitHub:
https://github.com/dbsrgits/sql-translator/pull/64
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.scsys.co.uk/pipermail/dbix-class-devel/attachments/20150804/329c60e8/attachment.htm>


More information about the DBIx-Class-Devel mailing list