Commit 0ddb8e4
lib: json: Fix escape sequence unescaping during decoding
Fix the JSON library to properly unescape sequences during decoding.
Previously, escape sequences like \n, \t, \" etc were validated but
not converted back to their actual character representations during
decoding, causing backslash duplication with each encode/decode cycle.
This fix modifies decode_string_buf() to properly handle escape
sequence unescaping and ensures strings maintain their original
content across multiple encode/decode cycles.
Signed-off-by: BUDKE Gerson Fernando <gerson.budke@leica-geosystems.com>1 parent 70961e2 commit 0ddb8e4
1 file changed
+73
-5
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
462 | 462 | | |
463 | 463 | | |
464 | 464 | | |
| 465 | + | |
| 466 | + | |
| 467 | + | |
| 468 | + | |
| 469 | + | |
| 470 | + | |
| 471 | + | |
| 472 | + | |
| 473 | + | |
| 474 | + | |
| 475 | + | |
| 476 | + | |
| 477 | + | |
| 478 | + | |
| 479 | + | |
| 480 | + | |
| 481 | + | |
| 482 | + | |
| 483 | + | |
| 484 | + | |
| 485 | + | |
| 486 | + | |
| 487 | + | |
| 488 | + | |
| 489 | + | |
| 490 | + | |
| 491 | + | |
| 492 | + | |
| 493 | + | |
| 494 | + | |
| 495 | + | |
| 496 | + | |
| 497 | + | |
| 498 | + | |
| 499 | + | |
| 500 | + | |
| 501 | + | |
| 502 | + | |
| 503 | + | |
| 504 | + | |
| 505 | + | |
| 506 | + | |
| 507 | + | |
| 508 | + | |
| 509 | + | |
| 510 | + | |
| 511 | + | |
| 512 | + | |
| 513 | + | |
| 514 | + | |
| 515 | + | |
| 516 | + | |
| 517 | + | |
| 518 | + | |
| 519 | + | |
| 520 | + | |
| 521 | + | |
| 522 | + | |
| 523 | + | |
| 524 | + | |
| 525 | + | |
| 526 | + | |
465 | 527 | | |
466 | 528 | | |
467 | | - | |
| 529 | + | |
| 530 | + | |
468 | 531 | | |
469 | | - | |
470 | | - | |
| 532 | + | |
| 533 | + | |
| 534 | + | |
| 535 | + | |
| 536 | + | |
471 | 537 | | |
472 | 538 | | |
473 | 539 | | |
474 | | - | |
475 | | - | |
| 540 | + | |
| 541 | + | |
| 542 | + | |
| 543 | + | |
476 | 544 | | |
477 | 545 | | |
478 | 546 | | |
| |||
0 commit comments