Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
25 changes: 0 additions & 25 deletions json/json_test.mbt
Original file line number Diff line number Diff line change
Expand Up @@ -621,31 +621,6 @@ test "nested json" {
})
}

///|
test "call stack overflow" {
let depth = 50000
let json_string = StringBuilder::new()
for _ in 0..=depth {
json_string.write_char('[')
}
for _ in 0..=depth {
json_string.write_char(']')
}
let _ = @json.parse(json_string.to_string()) catch { _ => null }
let depth = 1500
let json_string = StringBuilder::new()
for _ in 0..=depth {
json_string.write_char('[')
}
for _ in 0..=depth {
json_string.write_char(']')
}
let _ = @json.parse(json_string.to_string(), max_nesting_depth=2000) catch {
_ => null
}

}

///|
test "stringify deep nested array" {
// Build a deeply nested JSON array like [[[[[]]]]] with depth = 6000
Expand Down