31 lines
1.3 KiB
Diff
31 lines
1.3 KiB
Diff
diff --git a/third_party/rust/serde_json_lenient/v0_2/wrapper/lib.rs b/third_party/rust/serde_json_lenient/v0_2/wrapper/lib.rs
|
|
index 0ab0815146c1cbbd5730652876a22987c5d4a3b3..8b4c4beaa4d99227073e9fcf6f2f0dcf64866c3c 100644
|
|
--- a/third_party/rust/serde_json_lenient/v0_2/wrapper/lib.rs
|
|
+++ b/third_party/rust/serde_json_lenient/v0_2/wrapper/lib.rs
|
|
@@ -3,6 +3,7 @@
|
|
// found in the LICENSE file.
|
|
|
|
mod visitor;
|
|
+#[path = "../../../../../brave/chromium_src/third_party/rust/serde_json_lenient/v0_2/wrapper/large_integers.rs"] mod large_integers;
|
|
|
|
use crate::visitor::ValueVisitor;
|
|
|
|
@@ -79,6 +80,8 @@ mod ffi {
|
|
/// The maximum recursion depth to walk while parsing nested JSON
|
|
/// objects. JSON beyond the specified depth will be ignored.
|
|
max_depth: usize,
|
|
+ /// Allows 64-bit integers rather than trying to fit than as double.
|
|
+ allow_64bit_numbers: bool,
|
|
}
|
|
}
|
|
|
|
@@ -122,7 +125,7 @@ pub fn decode_json(
|
|
|
|
let target = visitor::DeserializationTarget::List { ctx };
|
|
|
|
- let result = deserializer.deserialize_any(ValueVisitor::new(target, options.max_depth));
|
|
+ let result = deserializer.deserialize_any(ValueVisitor::new(target, options.max_depth, options.allow_64bit_numbers));
|
|
match result.and(deserializer.end()) {
|
|
Ok(()) => true,
|
|
Err(err) => {
|