Sanic: ujson soft requirement

Created on 16 Feb 2017  路  6Comments  路  Source: sanic-org/sanic

I'm as big a fan as ujson as the next but it would be nice to have json parsing/serialization degrade gracefully if you can't fullfill the requirement. Be happy to submit a PR, would look more or less would like what bottle does

Most helpful comment

ujson is great but looks like it has lost steam, including open issues and PRs about segfaults and memory leaks. Rapidjson looks more healthy these days, though ideally the json codec used by Sanic should be configurable. I can work on a PR if you agree.

All 6 comments

What's the issue with ujson?

it's just slightly less portable than the stdlib verison, for example I hit a
ImportError: /lib64/libc.so.6: version 'GLIBC_2.14' not found
on rhel6 but it works fine on rhel7. I'll probably find a way to work around that somehow but be an easy change if here if it makes sense to you.

I'm fine with using that logic but let's leave it in requirements.txt imo.

awesome, thanks all

ujson is great but looks like it has lost steam, including open issues and PRs about segfaults and memory leaks. Rapidjson looks more healthy these days, though ideally the json codec used by Sanic should be configurable. I can work on a PR if you agree.

it would be much better to use rapidjson instead ujson.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

davidtgq picture davidtgq  路  3Comments

olalonde picture olalonde  路  3Comments

sirex picture sirex  路  4Comments

aiurlano picture aiurlano  路  4Comments

eseglem picture eseglem  路  4Comments