Commit 19c94ab
authored
Python: Serialize large integers as strings in RPC to avoid Jackson limits (#6829)
Jackson 2.15+ rejects JSON numbers exceeding 1000 digits via
StreamReadConstraints.getMaxNumberLength(). Python integers have
no size limit, so a literal like paramiko's 4096-bit DH prime
(1234 decimal digits) was serialized as a raw JSON number, causing
deserialization to fail on the Java side.
Convert integers exceeding Java's long range to strings before
serialization. The original source representation is preserved in
the literal's valueSource field, so printing is unaffected.1 parent 93bf91a commit 19c94ab
1 file changed
Lines changed: 8 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
316 | 316 | | |
317 | 317 | | |
318 | 318 | | |
319 | | - | |
| 319 | + | |
| 320 | + | |
| 321 | + | |
| 322 | + | |
| 323 | + | |
| 324 | + | |
| 325 | + | |
| 326 | + | |
320 | 327 | | |
321 | 328 | | |
322 | 329 | | |
| |||
0 commit comments