(budget: list[int], size: int)
| 237 | |
| 238 | |
| 239 | def consume_json_budget(budget: list[int], size: int) -> bool: |
| 240 | if budget[0] < size: |
| 241 | budget[0] = 0 |
| 242 | return False |
| 243 | budget[0] -= size |
| 244 | return True |
| 245 | |
| 246 | |
| 247 | def bounded_json_text(value: str, maximum_bytes: int) -> tuple[str, int]: |
no outgoing calls
no test coverage detected