Commit 1d14886
committed
Our internal serialization format allows to have several keys with
the same name in a map. When converting to JSON the case is quite
dangerous, despite the JSON spec is not mandatory about having
unique keys at the same level in a map, we got tons of reports that
backend services that receives JSON payload raises exception due
to duplicated keys.
On this patch now the JSON formatter will check for duplicated
keys, if found, it preserves the latest one found.
Signed-off-by: Eduardo Silva <eduardo@treasure-data.com>
1 parent 00e0742 commit 1d14886
1 file changed
Lines changed: 60 additions & 9 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
441 | 441 | | |
442 | 442 | | |
443 | 443 | | |
| 444 | + | |
| 445 | + | |
| 446 | + | |
| 447 | + | |
| 448 | + | |
| 449 | + | |
| 450 | + | |
| 451 | + | |
| 452 | + | |
| 453 | + | |
| 454 | + | |
| 455 | + | |
| 456 | + | |
| 457 | + | |
| 458 | + | |
| 459 | + | |
| 460 | + | |
| 461 | + | |
| 462 | + | |
| 463 | + | |
| 464 | + | |
| 465 | + | |
| 466 | + | |
| 467 | + | |
| 468 | + | |
| 469 | + | |
| 470 | + | |
| 471 | + | |
| 472 | + | |
| 473 | + | |
| 474 | + | |
| 475 | + | |
444 | 476 | | |
445 | 477 | | |
446 | 478 | | |
447 | | - | |
448 | 479 | | |
| 480 | + | |
| 481 | + | |
449 | 482 | | |
| 483 | + | |
450 | 484 | | |
451 | 485 | | |
452 | 486 | | |
| |||
558 | 592 | | |
559 | 593 | | |
560 | 594 | | |
| 595 | + | |
561 | 596 | | |
562 | | - | |
563 | | - | |
564 | | - | |
565 | | - | |
566 | | - | |
567 | | - | |
| 597 | + | |
| 598 | + | |
| 599 | + | |
| 600 | + | |
| 601 | + | |
| 602 | + | |
| 603 | + | |
| 604 | + | |
| 605 | + | |
| 606 | + | |
| 607 | + | |
| 608 | + | |
| 609 | + | |
| 610 | + | |
| 611 | + | |
| 612 | + | |
| 613 | + | |
| 614 | + | |
568 | 615 | | |
569 | | - | |
570 | 616 | | |
571 | 617 | | |
572 | 618 | | |
573 | 619 | | |
574 | | - | |
575 | 620 | | |
| 621 | + | |
576 | 622 | | |
577 | 623 | | |
578 | 624 | | |
| |||
907 | 953 | | |
908 | 954 | | |
909 | 955 | | |
| 956 | + | |
| 957 | + | |
| 958 | + | |
| 959 | + | |
| 960 | + | |
910 | 961 | | |
911 | 962 | | |
912 | 963 | | |
| |||
0 commit comments