Message291173
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". |
|
Date |
User |
Action |
Args |
2017-04-05 09:58:50 | oberstet | set | recipients:
+ oberstet, rhettinger, ezio.melotti, serhiy.storchaka |
2017-04-05 09:58:50 | oberstet | set | messageid: <1491386330.76.0.955096849979.issue29992@psf.upfronthosting.co.za> |
2017-04-05 09:58:50 | oberstet | link | issue29992 messages |
2017-04-05 09:58:50 | oberstet | create | |
|