falconry / falcon

The no-magic web data plane API and microservices framework for Python developers, with a focus on reliability, correctness, and performance at scale.
https://falcon.readthedocs.io/en/stable/
Apache License 2.0
9.51k stars 937 forks source link

docs(media): add an example for using a custom JSON encoder #2035

Closed maxking closed 2 years ago

maxking commented 2 years ago

Summary of Changes

Adds an example on how to override the default json encoder used by Falcon.

Pull Request Checklist

This is just a reminder about the most common mistakes. Please make sure that you tick all appropriate boxes. But please read our contribution guide at least once; it will save you a few review cycles!

If an item doesn't apply to your pull request, check it anyway to make it apparent that there's nothing to do.

codecov[bot] commented 2 years ago

Codecov Report

Merging #2035 (d5418c0) into master (43a8e80) will not change coverage. The diff coverage is n/a.

Impacted file tree graph

@@            Coverage Diff            @@
##            master     #2035   +/-   ##
=========================================
  Coverage   100.00%   100.00%           
=========================================
  Files           63        63           
  Lines         6707      6707           
  Branches      1238      1238           
=========================================
  Hits          6707      6707           
Impacted Files Coverage Δ
falcon/media/json.py 100.00% <ø> (ø)

Continue to review full report at Codecov.

Legend - Click here to learn more Δ = absolute <relative> (impact), ø = not affected, ? = missing data Powered by Codecov. Last update 43a8e80...d5418c0. Read the comment docs.

maxking commented 2 years ago

Working on adding a reference back from FAQ, Sphinx doesn't seem to like sections inside the docstrings and I am trying to see how to create a reference without a section in a paragraph. Will update the PR as soon as I can figure that out. :D

maxking commented 2 years ago

Thanks @vytas7, updated the PR.