Skip to content

Commit b013c03

Browse files
committed
compile fixes
1 parent ef5a32e commit b013c03

File tree

2 files changed

+4
-3
lines changed

2 files changed

+4
-3
lines changed

src/lib.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ extern crate core;
44

55
use std::sync::OnceLock;
66

7-
use jiter::{map_json_error, PartialMode, PythonParse, StringCacheMode};
7+
use jiter::{map_json_error, FloatMode, PartialMode, PythonParse, StringCacheMode};
88
use pyo3::exceptions::PyTypeError;
99
use pyo3::{prelude::*, sync::GILOnceCell};
1010
use serializers::BytesMode;
@@ -61,7 +61,7 @@ pub fn from_json<'py>(
6161
cache_mode: cache_strings,
6262
partial_mode: allow_partial,
6363
catch_duplicate_keys: false,
64-
lossless_floats: false,
64+
float_mode: FloatMode::Float,
6565
};
6666
parse_builder
6767
.python_parse(py, json_bytes)

src/validators/json.rs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
use jiter::FloatMode;
12
use pyo3::intern;
23
use pyo3::prelude::*;
34
use pyo3::types::PyDict;
@@ -71,7 +72,7 @@ impl Validator for JsonValidator {
7172
cache_mode: state.cache_str(),
7273
partial_mode: PartialMode::Off,
7374
catch_duplicate_keys: false,
74-
lossless_floats: false,
75+
float_mode: FloatMode::Float,
7576
};
7677
let obj = parse_builder
7778
.python_parse(py, json_bytes)

0 commit comments

Comments
 (0)