This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author oberstet
Recipients ezio.melotti, oberstet, rhettinger, serhiy.storchaka
Date 2017-04-05.09:58:50
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1491386330.76.0.955096849979.issue29992@psf.upfronthosting.co.za>
In-reply-to
Content
I agree, my use case is probably exotic: transparent roundtripping of binaries over JSON using a beginning \0 byte marker to distinguish plain string and base64 encoded binaries.

FWIW, I do think however that adding "parse_string" kw param to the ctor of JSONDecoder would at least fit the current approach: there are parse_xxx parameters for all the other things already.

If overriding string parsing would be via subclassing, while all the others stay with the kw parameter approach, that could be slightly confusing too, because it looses on consistency.

Switching everything to subclassing/overriding for _all_ parse_XXX is I guess a no go, because it breaks existing stuff?

> For me in my situation, it'll be messy anyways, because I need to support Py2 and 3, and CPy and PyPy .. I just filed the issue for "completeness".
History
Date User Action Args
2017-04-05 09:58:50oberstetsetrecipients: + oberstet, rhettinger, ezio.melotti, serhiy.storchaka
2017-04-05 09:58:50oberstetsetmessageid: <1491386330.76.0.955096849979.issue29992@psf.upfronthosting.co.za>
2017-04-05 09:58:50oberstetlinkissue29992 messages
2017-04-05 09:58:50oberstetcreate