Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add float_hook to json decoder #511

Merged
merged 1 commit into from
Aug 10, 2023
Merged

Add float_hook to json decoder #511

merged 1 commit into from
Aug 10, 2023

Commits on Aug 10, 2023

  1. Add float_hook to json decoder

    This adds support for a `float_hook` to the json decoder. If set, this
    hook will be called to decode any untyped JSON float values from their
    raw string representations. This may be used to change the default float
    parsing from returning ``float`` values to return ``decimal.Decimal``
    values again.
    
    Since this is an uncommon option, it's only available on the Decoder,
    rather than the top-level ``msgspec.json.decode`` function.
    jcrist committed Aug 10, 2023
    Configuration menu
    Copy the full SHA
    6f1529a View commit details
    Browse the repository at this point in the history