From b013c03c58d5a6fb599d5adabe2be731d53131e3 Mon Sep 17 00:00:00 2001 From: David Hewitt Date: Wed, 23 Oct 2024 15:04:50 +0100 Subject: [PATCH] compile fixes --- src/lib.rs | 4 ++-- src/validators/json.rs | 3 ++- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/src/lib.rs b/src/lib.rs index d1e042863..0fdb038ea 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -4,7 +4,7 @@ extern crate core; use std::sync::OnceLock; -use jiter::{map_json_error, PartialMode, PythonParse, StringCacheMode}; +use jiter::{map_json_error, FloatMode, PartialMode, PythonParse, StringCacheMode}; use pyo3::exceptions::PyTypeError; use pyo3::{prelude::*, sync::GILOnceCell}; use serializers::BytesMode; @@ -61,7 +61,7 @@ pub fn from_json<'py>( cache_mode: cache_strings, partial_mode: allow_partial, catch_duplicate_keys: false, - lossless_floats: false, + float_mode: FloatMode::Float, }; parse_builder .python_parse(py, json_bytes) diff --git a/src/validators/json.rs b/src/validators/json.rs index f86cc4624..79a36e058 100644 --- a/src/validators/json.rs +++ b/src/validators/json.rs @@ -1,3 +1,4 @@ +use jiter::FloatMode; use pyo3::intern; use pyo3::prelude::*; use pyo3::types::PyDict; @@ -71,7 +72,7 @@ impl Validator for JsonValidator { cache_mode: state.cache_str(), partial_mode: PartialMode::Off, catch_duplicate_keys: false, - lossless_floats: false, + float_mode: FloatMode::Float, }; let obj = parse_builder .python_parse(py, json_bytes)