Press n or j to go to the next uncovered block, b, p or k for the previous block.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 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 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 527 528 529 530 531 532 533 534 535 536 537 538 539 540 541 542 543 544 545 546 547 548 549 550 551 552 553 554 555 556 557 558 559 560 561 562 563 564 565 566 567 568 569 570 571 572 573 574 575 576 577 578 579 580 581 582 583 584 585 586 587 588 589 590 591 592 593 594 595 596 597 598 599 600 601 602 603 604 605 606 607 608 609 610 611 612 613 614 615 616 617 618 619 620 621 622 623 624 625 626 627 628 629 630 631 632 633 634 635 636 637 638 639 640 641 642 643 644 645 646 647 648 649 650 651 652 653 654 655 656 657 658 659 660 661 662 663 664 665 666 667 668 669 670 671 672 673 674 675 676 677 678 679 680 681 682 683 684 685 686 687 688 689 690 691 692 693 694 695 696 697 698 699 700 701 702 703 704 705 706 707 708 709 710 711 712 713 714 715 716 717 718 719 720 721 722 723 724 725 726 727 728 729 730 731 732 733 734 735 736 737 738 739 740 741 742 743 744 745 746 747 748 749 750 751 752 753 754 755 756 757 758 759 760 761 762 763 764 765 766 767 768 769 770 771 772 773 774 775 776 777 778 779 780 781 782 783 784 785 786 787 788 789 790 791 792 793 794 795 796 797 798 799 800 801 802 803 804 805 806 807 808 809 810 811 812 813 814 815 816 817 818 819 820 821 822 823 824 825 826 827 828 829 830 831 832 833 834 835 836 837 838 839 840 841 842 843 844 845 846 847 848 849 850 851 852 853 854 855 856 857 858 859 860 861 862 863 864 865 866 867 868 869 870 871 872 873 874 875 876 877 878 879 880 881 882 883 884 885 886 887 888 889 890 891 892 893 894 895 896 897 898 899 900 901 902 903 904 905 906 907 908 909 910 911 912 913 914 915 916 917 918 919 920 921 922 923 924 925 926 927 928 929 930 931 932 933 934 935 936 937 938 939 940 941 942 943 944 945 946 947 948 949 950 951 952 953 954 955 956 957 958 959 960 961 962 963 964 965 966 967 968 969 970 971 972 973 974 975 976 977 978 979 980 981 982 983 984 985 986 987 988 989 990 991 992 993 994 995 996 997 998 999 1000 1001 1002 1003 1004 1005 1006 1007 1008 1009 1010 1011 1012 1013 1014 1015 1016 1017 1018 1019 1020 1021 1022 1023 1024 1025 1026 1027 1028 1029 1030 1031 1032 1033 1034 1035 1036 1037 1038 1039 1040 1041 1042 1043 1044 1045 1046 1047 1048 1049 1050 1051 1052 1053 1054 1055 1056 1057 1058 1059 1060 1061 1062 1063 1064 1065 1066 1067 1068 1069 1070 1071 1072 1073 1074 1075 1076 1077 1078 1079 1080 1081 1082 1083 1084 1085 1086 1087 1088 1089 1090 1091 1092 1093 1094 1095 1096 1097 1098 1099 1100 1101 1102 1103 1104 1105 1106 1107 1108 1109 1110 1111 1112 1113 1114 1115 1116 1117 1118 1119 1120 1121 1122 1123 1124 1125 1126 1127 1128 1129 1130 1131 1132 1133 1134 1135 1136 1137 1138 1139 1140 1141 1142 1143 1144 1145 1146 1147 1148 1149 1150 1151 1152 1153 1154 1155 1156 | 1x 1x 1x 287x 287x 287x 287x 287x 287x 26x 26x 26x 287x 287x 287x 26x 26x 26x 26x 26x 26x 287x 287x 287x 287x 287x 26x 26x 26x 26x 26x 26x 1x 1x 26x 26x 26x 26x 26x 26x 1x 1x 26x 26x 26x 26x 26x 26x 1x 26x 26x 26x 26x 26x 26x 1x 1x 1x 1x 1x 1x 287x 287x 287x 287x 287x 287x 287x 287x 287x 287x 287x 287x 287x 287x 287x 287x 287x 287x 287x 287x 287x 287x 287x 287x 287x 287x 287x 287x 287x 287x 287x 287x 287x 287x 287x 287x 287x 287x 287x 287x 287x 287x 287x 287x 287x 287x 287x 287x 287x 287x 287x 287x 287x 287x 287x 287x 287x 287x 287x 287x 287x 287x 287x 287x 287x 287x 287x 287x 287x 287x 287x 287x 287x 287x 287x 287x 287x 287x 287x 287x 287x 287x 287x 287x 287x 287x 117x 117x 117x 117x 117x 117x 117x 117x 117x 117x 117x 117x 117x 117x 117x 117x 287x 20x 20x 287x 48x 48x 48x 48x 48x 48x 48x 48x 48x 48x 48x 48x 4x 48x 44x 44x 27x 27x 44x 18x 18x 44x 42x 46x 48x 287x 216x 216x 216x 216x 216x 216x 216x 216x 216x 216x 216x 216x 216x 216x 216x 216x 216x 216x 216x 216x 216x 216x 216x 216x 216x 216x 216x 216x 216x 216x 216x 216x 216x 216x 216x 216x 216x 216x 216x 170x 170x 46x 216x 6x 6x 6x 216x 17x 216x 29x 29x 25x 25x 29x 46x 216x 287x 150x 150x 150x 150x 150x 150x 150x 150x 150x 150x 150x 150x 150x 150x 150x 150x 150x 150x 150x 150x 150x 150x 150x 150x 150x 150x 150x 150x 150x 113x 113x 150x 150x 287x 287x 31x 31x 31x 31x 31x 31x 31x 31x 31x 31x 31x 31x 31x 287x 7x 7x 287x 82x 82x 82x 82x 82x 82x 82x 82x 82x 82x 82x 82x 82x 82x 80x 80x 82x 80x 82x 287x 218x 218x 218x 218x 218x 218x 218x 218x 218x 218x 218x 218x 218x 218x 218x 218x 218x 218x 218x 218x 218x 218x 218x 218x 218x 218x 218x 218x 218x 218x 218x 218x 218x 218x 218x 368x 368x 368x 368x 368x 368x 368x 368x 368x 138x 138x 53x 53x 16x 15x 53x 137x 137x 137x 137x 137x 367x 367x 367x 368x 217x 217x 368x 217x 217x 218x 287x 334x 5x 334x 287x 5x 5x 5x 5x 5x 5x 5x 5x 5x 5x 5x 5x 5x 5x 5x 5x 5x 5x 5x 5x 5x 5x 5x 5x 1x 5x 2x 5x 7x 7x 7x 3x 7x 1x 4x 2x 2x 1x 1x 1x 1x 2x 3x 1x 7x 1x 5x 287x 5x 4x 5x 287x 4x 4x 4x 4x 287x 27x 27x 27x 27x 27x 26x 26x 26x 26x 26x 26x 26x 27x 287x 4x 4x 4x 4x 4x 4x 4x 287x 6x 6x 6x 6x 6x 6x 6x 287x 288x 288x 288x 288x 288x 288x 288x 288x 287x 1x 1x 287x 5x 5x 5x 5x 5x 5x 5x 5x 5x 5x 5x 5x 5x 5x 5x 5x 5x 5x 287x 4x 4x 4x 4x 4x 4x 4x 4x 4x 4x 4x 4x 4x 4x 1x 4x 1x 3x 2x 2x 3x 4x 287x 3x 3x 3x 3x 3x 3x 3x 3x 3x 3x 3x 3x 3x 3x 3x 3x 3x 3x 3x 3x 3x 3x 287x 5x 5x 5x 5x 5x 5x 5x 5x 5x 5x 5x 5x 5x 5x 4x 4x 5x 5x 287x 9x 9x 9x 9x 9x 9x 9x 9x 9x 9x 9x 9x 9x 9x 9x 9x 9x 9x 287x 3x 3x 3x 3x 3x 3x 3x 3x 3x 3x 3x 3x 3x 3x 2x 2x 3x 3x 287x 20x 20x 20x 20x 20x 20x 20x 20x 20x 20x 20x 20x 20x 20x 17x 17x 20x 20x 287x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 287x 26x 26x 26x 26x 287x 7x 7x 7x 7x 7x 287x 10x 10x 10x 10x 10x 10x 10x 287x 2x 2x 2x 2x 2x 2x 2x 2x 2x 2x 2x 2x 2x 2x 2x 4x 4x 4x 2x 2x 287x 145x 145x 145x 145x 145x 145x 145x 145x 287x 29x 29x 29x 29x 29x 29x 29x 29x 29x 29x 29x 29x 29x 29x 29x 29x 29x 29x 29x 29x 29x 29x 28x 29x 1x 29x 1x 26x 26x 26x 26x 26x 26x 26x 26x 26x 26x 26x 26x 26x 26x 26x 26x 26x 26x 26x 26x 26x 26x 26x 26x 29x 287x 232x 232x 232x 232x 232x 232x 232x 232x 232x 232x 232x 232x 232x 232x 232x 232x 232x 232x 232x 232x 232x 232x 232x 232x 232x 232x 232x 232x 232x 232x 232x 231x 232x 9x 9x 232x 222x 232x 34x 34x 34x 34x 34x 34x 232x 187x 187x 187x 187x 187x 187x 187x 187x 187x 187x 187x 187x 232x 9x 232x 8x 8x 232x 47x 232x 138x 138x 185x 185x 185x 185x 185x 232x 287x 27x 27x 27x 27x 27x 27x 27x 27x 27x 27x 27x 27x 27x 27x 27x 1x 1x 27x 1x 27x 1x 26x 1x 25x 8x 8x 24x 1x 1x 16x 7x 15x 8x 8x 3x 3x 8x 8x 25x 25x 27x 287x 8x 8x 8x 8x 8x 8x 8x 8x 8x 8x 8x 287x 2x 2x 2x 2x 2x 2x 2x 2x 2x 2x 2x 2x 2x 287x 9x 9x 9x 9x 9x 9x 9x 9x 9x 9x 9x 287x 2x 2x 2x 2x 2x 2x 2x 2x 2x 287x 26x 26x 26x 26x 26x 26x 26x 26x 26x 26x 26x 287x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 287x 287x 4x 4x 4x 4x 4x 4x 4x 4x 4x 4x 4x 4x 4x 4x 4x 4x 4x 4x 4x 4x 4x 4x 4x 4x 4x 4x 4x 4x 4x 4x 4x 4x 4x 4x 4x 4x 51x 51x 51x 51x 4x 4x 4x 287x 79x 79x 79x 79x 79x 79x 79x 287x 41x 41x 41x 41x 41x 41x 41x 41x 41x 41x 41x 41x 41x 41x 41x 41x 41x 41x 41x 41x 41x 41x 41x 41x 41x 41x 41x 41x 41x 41x 41x 41x 41x 41x 41x 40x 41x 4x 4x 4x 4x 4x 4x 41x 2x 41x 34x 34x 41x 28x 28x 28x 28x 28x 28x 28x 28x 28x 28x 28x 28x 28x 28x 28x 2x 1x 1x 1x 1x 2x 28x 41x 1x 35x 35x 41x 287x 17x 17x 17x 17x 17x 17x 17x 17x 17x 17x 17x 287x 1x 1x 1x 1x 1x 1x 1x 1x 287x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x | await import("./zcl_abapgit_ajson.clas.locals.mjs"); const {cx_root} = await import("./cx_root.clas.mjs"); // zcl_abapgit_ajson.clas.abap class zcl_abapgit_ajson { static INTERNAL_TYPE = 'CLAS'; static INTERNAL_NAME = 'ZCL_ABAPGIT_AJSON'; static IMPLEMENTED_INTERFACES = ["ZIF_ABAPGIT_AJSON"]; static ATTRIBUTES = {"GO_FLOAT_REGEX": {"type": () => {return new abap.types.ABAPObject({qualifiedName: "CL_ABAP_REGEX", RTTIName: "\\CLASS=CL_ABAP_REGEX"});}, "visibility": "I", "is_constant": " ", "is_class": "X"}, "MS_OPTS": {"type": () => {return new abap.types.Structure({ "read_only": new abap.types.Character(1, {"qualifiedName":"ABAP_BOOL","ddicName":"ABAP_BOOL"}), "keep_item_order": new abap.types.Character(1, {"qualifiedName":"ABAP_BOOL","ddicName":"ABAP_BOOL"}), "format_datetime": new abap.types.Character(1, {"qualifiedName":"ABAP_BOOL","ddicName":"ABAP_BOOL"}), "to_abap_corresponding_only": new abap.types.Character(1, {"qualifiedName":"ABAP_BOOL","ddicName":"ABAP_BOOL"})}, "zif_abapgit_ajson=>ty_opts", undefined, {}, {});}, "visibility": "I", "is_constant": " ", "is_class": " "}, "MI_CUSTOM_MAPPING": {"type": () => {return new abap.types.ABAPObject({qualifiedName: "ZIF_ABAPGIT_AJSON_MAPPING", RTTIName: "\\INTERFACE=ZIF_ABAPGIT_AJSON_MAPPING"});}, "visibility": "I", "is_constant": " ", "is_class": " "}, "ZIF_ABAPGIT_AJSON~MT_JSON_TREE": {"type": () => {return abap.types.TableFactory.construct(new abap.types.Structure({ "path": new abap.types.String({qualifiedName: "ZIF_ABAPGIT_AJSON_TYPES=>TY_NODE-PATH"}), "name": new abap.types.String({qualifiedName: "ZIF_ABAPGIT_AJSON_TYPES=>TY_NODE-NAME"}), "type": new abap.types.String({qualifiedName: "ZIF_ABAPGIT_AJSON_TYPES=>TY_NODE_TYPE"}), "value": new abap.types.String({qualifiedName: "ZIF_ABAPGIT_AJSON_TYPES=>TY_NODE-VALUE"}), "index": new abap.types.Integer({qualifiedName: "ZIF_ABAPGIT_AJSON_TYPES=>TY_NODE-INDEX"}), "order": new abap.types.Integer({qualifiedName: "ZIF_ABAPGIT_AJSON_TYPES=>TY_NODE-ORDER"}), "children": new abap.types.Integer({qualifiedName: "ZIF_ABAPGIT_AJSON_TYPES=>TY_NODE-CHILDREN"})}, "zif_abapgit_ajson_types=>ty_node", undefined, {}, {}), {"withHeader":false,"keyType":"USER","primaryKey":{"name":"primary_key","type":"SORTED","isUnique":true,"keyFields":["PATH","NAME"]},"secondary":[{"name":"array_index","type":"SORTED","isUnique":false,"keyFields":["PATH","INDEX"]},{"name":"item_order","type":"SORTED","isUnique":false,"keyFields":["PATH","ORDER"]}]}, "zif_abapgit_ajson_types=>ty_nodes_ts");}, "visibility": "U", "is_constant": " ", "is_class": " "}, "ZIF_ABAPGIT_AJSON~VERSION": {"type": () => {return new abap.types.String({qualifiedName: "STRING"});}, "visibility": "U", "is_constant": "X", "is_class": "X"}, "ZIF_ABAPGIT_AJSON~ORIGIN": {"type": () => {return new abap.types.String({qualifiedName: "STRING"});}, "visibility": "U", "is_constant": "X", "is_class": "X"}, "ZIF_ABAPGIT_AJSON~LICENSE": {"type": () => {return new abap.types.String({qualifiedName: "STRING"});}, "visibility": "U", "is_constant": "X", "is_class": "X"}}; static METHODS = {"GET_ITEM": {"visibility": "I", "parameters": {"RV_ITEM": {"type": () => {return new abap.types.DataReference(new abap.types.Structure({ "path": new abap.types.String({qualifiedName: "ZIF_ABAPGIT_AJSON_TYPES=>TY_NODE-PATH"}), "name": new abap.types.String({qualifiedName: "ZIF_ABAPGIT_AJSON_TYPES=>TY_NODE-NAME"}), "type": new abap.types.String({qualifiedName: "ZIF_ABAPGIT_AJSON_TYPES=>TY_NODE_TYPE"}), "value": new abap.types.String({qualifiedName: "ZIF_ABAPGIT_AJSON_TYPES=>TY_NODE-VALUE"}), "index": new abap.types.Integer({qualifiedName: "ZIF_ABAPGIT_AJSON_TYPES=>TY_NODE-INDEX"}), "order": new abap.types.Integer({qualifiedName: "ZIF_ABAPGIT_AJSON_TYPES=>TY_NODE-ORDER"}), "children": new abap.types.Integer({qualifiedName: "ZIF_ABAPGIT_AJSON_TYPES=>TY_NODE-CHILDREN"})}, "zif_abapgit_ajson_types=>ty_node", undefined, {}, {}));}, "is_optional": " "}, "IV_PATH": {"type": () => {return new abap.types.String({qualifiedName: "STRING"});}, "is_optional": " "}}}, "PROVE_PATH_EXISTS": {"visibility": "I", "parameters": {"RR_END_NODE": {"type": () => {return new abap.types.DataReference(new abap.types.Structure({ "path": new abap.types.String({qualifiedName: "ZIF_ABAPGIT_AJSON_TYPES=>TY_NODE-PATH"}), "name": new abap.types.String({qualifiedName: "ZIF_ABAPGIT_AJSON_TYPES=>TY_NODE-NAME"}), "type": new abap.types.String({qualifiedName: "ZIF_ABAPGIT_AJSON_TYPES=>TY_NODE_TYPE"}), "value": new abap.types.String({qualifiedName: "ZIF_ABAPGIT_AJSON_TYPES=>TY_NODE-VALUE"}), "index": new abap.types.Integer({qualifiedName: "ZIF_ABAPGIT_AJSON_TYPES=>TY_NODE-INDEX"}), "order": new abap.types.Integer({qualifiedName: "ZIF_ABAPGIT_AJSON_TYPES=>TY_NODE-ORDER"}), "children": new abap.types.Integer({qualifiedName: "ZIF_ABAPGIT_AJSON_TYPES=>TY_NODE-CHILDREN"})}, "zif_abapgit_ajson_types=>ty_node", undefined, {}, {}));}, "is_optional": " "}, "IV_PATH": {"type": () => {return new abap.types.String({qualifiedName: "STRING"});}, "is_optional": " "}}}, "DELETE_SUBTREE": {"visibility": "I", "parameters": {"RS_TOP_NODE": {"type": () => {return new abap.types.Structure({ "path": new abap.types.String({qualifiedName: "ZIF_ABAPGIT_AJSON_TYPES=>TY_NODE-PATH"}), "name": new abap.types.String({qualifiedName: "ZIF_ABAPGIT_AJSON_TYPES=>TY_NODE-NAME"}), "type": new abap.types.String({qualifiedName: "ZIF_ABAPGIT_AJSON_TYPES=>TY_NODE_TYPE"}), "value": new abap.types.String({qualifiedName: "ZIF_ABAPGIT_AJSON_TYPES=>TY_NODE-VALUE"}), "index": new abap.types.Integer({qualifiedName: "ZIF_ABAPGIT_AJSON_TYPES=>TY_NODE-INDEX"}), "order": new abap.types.Integer({qualifiedName: "ZIF_ABAPGIT_AJSON_TYPES=>TY_NODE-ORDER"}), "children": new abap.types.Integer({qualifiedName: "ZIF_ABAPGIT_AJSON_TYPES=>TY_NODE-CHILDREN"})}, "zif_abapgit_ajson_types=>ty_node", undefined, {}, {});}, "is_optional": " "}, "IV_PATH": {"type": () => {return new abap.types.String({qualifiedName: "STRING"});}, "is_optional": " "}, "IV_NAME": {"type": () => {return new abap.types.String({qualifiedName: "STRING"});}, "is_optional": " "}, "IR_PARENT": {"type": () => {return new abap.types.DataReference(new abap.types.Structure({ "path": new abap.types.String({qualifiedName: "ZIF_ABAPGIT_AJSON_TYPES=>TY_NODE-PATH"}), "name": new abap.types.String({qualifiedName: "ZIF_ABAPGIT_AJSON_TYPES=>TY_NODE-NAME"}), "type": new abap.types.String({qualifiedName: "ZIF_ABAPGIT_AJSON_TYPES=>TY_NODE_TYPE"}), "value": new abap.types.String({qualifiedName: "ZIF_ABAPGIT_AJSON_TYPES=>TY_NODE-VALUE"}), "index": new abap.types.Integer({qualifiedName: "ZIF_ABAPGIT_AJSON_TYPES=>TY_NODE-INDEX"}), "order": new abap.types.Integer({qualifiedName: "ZIF_ABAPGIT_AJSON_TYPES=>TY_NODE-ORDER"}), "children": new abap.types.Integer({qualifiedName: "ZIF_ABAPGIT_AJSON_TYPES=>TY_NODE-CHILDREN"})}, "zif_abapgit_ajson_types=>ty_node", undefined, {}, {}));}, "is_optional": " "}}}, "READ_ONLY_WATCHDOG": {"visibility": "I", "parameters": {}}, "PARSE": {"visibility": "U", "parameters": {"RO_INSTANCE": {"type": () => {return new abap.types.ABAPObject({qualifiedName: "ZCL_ABAPGIT_AJSON", RTTIName: "\\CLASS=ZCL_ABAPGIT_AJSON"});}, "is_optional": " "}, "IV_JSON": {"type": () => {return new abap.types.Character(4);}, "is_optional": " "}, "IV_FREEZE": {"type": () => {return new abap.types.Character(1, {"qualifiedName":"ABAP_BOOL","ddicName":"ABAP_BOOL"});}, "is_optional": " "}, "II_CUSTOM_MAPPING": {"type": () => {return new abap.types.ABAPObject({qualifiedName: "ZIF_ABAPGIT_AJSON_MAPPING", RTTIName: "\\INTERFACE=ZIF_ABAPGIT_AJSON_MAPPING"});}, "is_optional": " "}, "IV_KEEP_ITEM_ORDER": {"type": () => {return new abap.types.Character(1, {"qualifiedName":"ABAP_BOOL","ddicName":"ABAP_BOOL"});}, "is_optional": " "}}}, "CREATE_EMPTY": {"visibility": "U", "parameters": {"RO_INSTANCE": {"type": () => {return new abap.types.ABAPObject({qualifiedName: "ZCL_ABAPGIT_AJSON", RTTIName: "\\CLASS=ZCL_ABAPGIT_AJSON"});}, "is_optional": " "}, "II_CUSTOM_MAPPING": {"type": () => {return new abap.types.ABAPObject({qualifiedName: "ZIF_ABAPGIT_AJSON_MAPPING", RTTIName: "\\INTERFACE=ZIF_ABAPGIT_AJSON_MAPPING"});}, "is_optional": " "}, "IV_KEEP_ITEM_ORDER": {"type": () => {return new abap.types.Character(1, {"qualifiedName":"ABAP_BOOL","ddicName":"ABAP_BOOL"});}, "is_optional": " "}, "IV_FORMAT_DATETIME": {"type": () => {return new abap.types.Character(1, {"qualifiedName":"ABAP_BOOL","ddicName":"ABAP_BOOL"});}, "is_optional": " "}, "IV_TO_ABAP_CORRESPONDING_ONLY": {"type": () => {return new abap.types.Character(1, {"qualifiedName":"ABAP_BOOL","ddicName":"ABAP_BOOL"});}, "is_optional": " "}}}, "CREATE_FROM": {"visibility": "U", "parameters": {"RO_INSTANCE": {"type": () => {return new abap.types.ABAPObject({qualifiedName: "ZCL_ABAPGIT_AJSON", RTTIName: "\\CLASS=ZCL_ABAPGIT_AJSON"});}, "is_optional": " "}, "II_SOURCE_JSON": {"type": () => {return new abap.types.ABAPObject({qualifiedName: "ZIF_ABAPGIT_AJSON", RTTIName: "\\INTERFACE=ZIF_ABAPGIT_AJSON"});}, "is_optional": " "}, "II_FILTER": {"type": () => {return new abap.types.ABAPObject({qualifiedName: "ZIF_ABAPGIT_AJSON_FILTER", RTTIName: "\\INTERFACE=ZIF_ABAPGIT_AJSON_FILTER"});}, "is_optional": " "}, "II_MAPPER": {"type": () => {return new abap.types.ABAPObject({qualifiedName: "ZIF_ABAPGIT_AJSON_MAPPING", RTTIName: "\\INTERFACE=ZIF_ABAPGIT_AJSON_MAPPING"});}, "is_optional": " "}}}, "CONSTRUCTOR": {"visibility": "U", "parameters": {"IV_KEEP_ITEM_ORDER": {"type": () => {return new abap.types.Character(1, {"qualifiedName":"ABAP_BOOL","ddicName":"ABAP_BOOL"});}, "is_optional": " "}, "IV_FORMAT_DATETIME": {"type": () => {return new abap.types.Character(1, {"qualifiedName":"ABAP_BOOL","ddicName":"ABAP_BOOL"});}, "is_optional": " "}, "IV_TO_ABAP_CORRESPONDING_ONLY": {"type": () => {return new abap.types.Character(1, {"qualifiedName":"ABAP_BOOL","ddicName":"ABAP_BOOL"});}, "is_optional": " "}}}, "NEW": {"visibility": "U", "parameters": {"RO_INSTANCE": {"type": () => {return new abap.types.ABAPObject({qualifiedName: "ZCL_ABAPGIT_AJSON", RTTIName: "\\CLASS=ZCL_ABAPGIT_AJSON"});}, "is_optional": " "}, "IV_KEEP_ITEM_ORDER": {"type": () => {return new abap.types.Character(1, {"qualifiedName":"ABAP_BOOL","ddicName":"ABAP_BOOL"});}, "is_optional": " "}, "IV_FORMAT_DATETIME": {"type": () => {return new abap.types.Character(1, {"qualifiedName":"ABAP_BOOL","ddicName":"ABAP_BOOL"});}, "is_optional": " "}, "IV_TO_ABAP_CORRESPONDING_ONLY": {"type": () => {return new abap.types.Character(1, {"qualifiedName":"ABAP_BOOL","ddicName":"ABAP_BOOL"});}, "is_optional": " "}}}}; #go_float_regex; #ms_opts; #mi_custom_mapping; constructor() { this.me = new abap.types.ABAPObject(); this.me.set(this); this.INTERNAL_ID = abap.internalIdCounter++; this.FRIENDS_ACCESS_INSTANCE = { "get_item": this.#get_item.bind(this), "prove_path_exists": this.#prove_path_exists.bind(this), "delete_subtree": this.#delete_subtree.bind(this), "read_only_watchdog": this.#read_only_watchdog.bind(this), }; this.go_float_regex = zcl_abapgit_ajson.go_float_regex; this.#ms_opts = new abap.types.Structure({ "read_only": new abap.types.Character(1, {"qualifiedName":"ABAP_BOOL","ddicName":"ABAP_BOOL"}), "keep_item_order": new abap.types.Character(1, {"qualifiedName":"ABAP_BOOL","ddicName":"ABAP_BOOL"}), "format_datetime": new abap.types.Character(1, {"qualifiedName":"ABAP_BOOL","ddicName":"ABAP_BOOL"}), "to_abap_corresponding_only": new abap.types.Character(1, {"qualifiedName":"ABAP_BOOL","ddicName":"ABAP_BOOL"})}, "zif_abapgit_ajson=>ty_opts", undefined, {}, {}); this.FRIENDS_ACCESS_INSTANCE["ms_opts"] = this.#ms_opts; this.#mi_custom_mapping = new abap.types.ABAPObject({qualifiedName: "ZIF_ABAPGIT_AJSON_MAPPING", RTTIName: "\\INTERFACE=ZIF_ABAPGIT_AJSON_MAPPING"}); this.FRIENDS_ACCESS_INSTANCE["mi_custom_mapping"] = this.#mi_custom_mapping; this.zif_abapgit_ajson$version = abap.Classes['ZIF_ABAPGIT_AJSON'].zif_abapgit_ajson$version; this.zif_abapgit_ajson$origin = abap.Classes['ZIF_ABAPGIT_AJSON'].zif_abapgit_ajson$origin; this.zif_abapgit_ajson$license = abap.Classes['ZIF_ABAPGIT_AJSON'].zif_abapgit_ajson$license; if (this.zif_abapgit_ajson$mt_json_tree === undefined) this.zif_abapgit_ajson$mt_json_tree = abap.types.TableFactory.construct(new abap.types.Structure({ "path": new abap.types.String({qualifiedName: "ZIF_ABAPGIT_AJSON_TYPES=>TY_NODE-PATH"}), "name": new abap.types.String({qualifiedName: "ZIF_ABAPGIT_AJSON_TYPES=>TY_NODE-NAME"}), "type": new abap.types.String({qualifiedName: "ZIF_ABAPGIT_AJSON_TYPES=>TY_NODE_TYPE"}), "value": new abap.types.String({qualifiedName: "ZIF_ABAPGIT_AJSON_TYPES=>TY_NODE-VALUE"}), "index": new abap.types.Integer({qualifiedName: "ZIF_ABAPGIT_AJSON_TYPES=>TY_NODE-INDEX"}), "order": new abap.types.Integer({qualifiedName: "ZIF_ABAPGIT_AJSON_TYPES=>TY_NODE-ORDER"}), "children": new abap.types.Integer({qualifiedName: "ZIF_ABAPGIT_AJSON_TYPES=>TY_NODE-CHILDREN"})}, "zif_abapgit_ajson_types=>ty_node", undefined, {}, {}), {"withHeader":false,"keyType":"USER","primaryKey":{"name":"primary_key","type":"SORTED","isUnique":true,"keyFields":["PATH","NAME"]},"secondary":[{"name":"array_index","type":"SORTED","isUnique":false,"keyFields":["PATH","INDEX"]},{"name":"item_order","type":"SORTED","isUnique":false,"keyFields":["PATH","ORDER"]}]}, "zif_abapgit_ajson_types=>ty_nodes_ts"); this.is_empty = this.zif_abapgit_ajson$is_empty; this.exists = this.zif_abapgit_ajson$exists; this.members = this.zif_abapgit_ajson$members; this.get = this.zif_abapgit_ajson$get; this.get_boolean = this.zif_abapgit_ajson$get_boolean; this.get_integer = this.zif_abapgit_ajson$get_integer; this.get_number = this.zif_abapgit_ajson$get_number; this.get_date = this.zif_abapgit_ajson$get_date; this.get_timestamp = this.zif_abapgit_ajson$get_timestamp; this.get_string = this.zif_abapgit_ajson$get_string; this.slice = this.zif_abapgit_ajson$slice; this.to_abap = this.zif_abapgit_ajson$to_abap; this.array_to_string_table = this.zif_abapgit_ajson$array_to_string_table; this.clear = this.zif_abapgit_ajson$clear; this.set = this.zif_abapgit_ajson$set; this.setx = this.zif_abapgit_ajson$setx; this.set_boolean = this.zif_abapgit_ajson$set_boolean; this.set_string = this.zif_abapgit_ajson$set_string; this.set_integer = this.zif_abapgit_ajson$set_integer; this.set_date = this.zif_abapgit_ajson$set_date; this.set_timestamp = this.zif_abapgit_ajson$set_timestamp; this.set_null = this.zif_abapgit_ajson$set_null; this.delete = this.zif_abapgit_ajson$delete; this.touch_array = this.zif_abapgit_ajson$touch_array; this.push = this.zif_abapgit_ajson$push; this.stringify = this.zif_abapgit_ajson$stringify; this.clone = this.zif_abapgit_ajson$clone; this.filter = this.zif_abapgit_ajson$filter; this.map = this.zif_abapgit_ajson$map; this.mt_json_tree = this.zif_abapgit_ajson$mt_json_tree; this.keep_item_order = this.zif_abapgit_ajson$keep_item_order; this.format_datetime = this.zif_abapgit_ajson$format_datetime; this.to_abap_corresponding_only = this.zif_abapgit_ajson$to_abap_corresponding_only; this.freeze = this.zif_abapgit_ajson$freeze; } async constructor_(INPUT) { let iv_keep_item_order = new abap.types.Character(1, {"qualifiedName":"ABAP_BOOL","ddicName":"ABAP_BOOL"}); if (INPUT && INPUT.iv_keep_item_order) {iv_keep_item_order.set(INPUT.iv_keep_item_order);} if (INPUT === undefined || INPUT.iv_keep_item_order === undefined) {iv_keep_item_order = abap.builtin.abap_false;} let iv_format_datetime = new abap.types.Character(1, {"qualifiedName":"ABAP_BOOL","ddicName":"ABAP_BOOL"}); if (INPUT && INPUT.iv_format_datetime) {iv_format_datetime.set(INPUT.iv_format_datetime);} if (INPUT === undefined || INPUT.iv_format_datetime === undefined) {iv_format_datetime = abap.builtin.abap_true;} let iv_to_abap_corresponding_only = new abap.types.Character(1, {"qualifiedName":"ABAP_BOOL","ddicName":"ABAP_BOOL"}); if (INPUT && INPUT.iv_to_abap_corresponding_only) {iv_to_abap_corresponding_only.set(INPUT.iv_to_abap_corresponding_only);} if (INPUT === undefined || INPUT.iv_to_abap_corresponding_only === undefined) {iv_to_abap_corresponding_only = abap.builtin.abap_false;} this.#ms_opts.get().keep_item_order.set(iv_keep_item_order); this.#ms_opts.get().to_abap_corresponding_only.set(iv_to_abap_corresponding_only); await this.zif_abapgit_ajson$format_datetime({iv_use_iso: iv_format_datetime}); return this; } async create_empty(INPUT) { return zcl_abapgit_ajson.create_empty(INPUT); } static async create_empty(INPUT) { let ro_instance = new abap.types.ABAPObject({qualifiedName: "ZCL_ABAPGIT_AJSON", RTTIName: "\\CLASS=ZCL_ABAPGIT_AJSON"}); let ii_custom_mapping = new abap.types.ABAPObject({qualifiedName: "ZIF_ABAPGIT_AJSON_MAPPING", RTTIName: "\\INTERFACE=ZIF_ABAPGIT_AJSON_MAPPING"}); if (INPUT && INPUT.ii_custom_mapping) {ii_custom_mapping.set(INPUT.ii_custom_mapping);} let iv_keep_item_order = new abap.types.Character(1, {"qualifiedName":"ABAP_BOOL","ddicName":"ABAP_BOOL"}); if (INPUT && INPUT.iv_keep_item_order) {iv_keep_item_order.set(INPUT.iv_keep_item_order);} if (INPUT === undefined || INPUT.iv_keep_item_order === undefined) {iv_keep_item_order = abap.builtin.abap_false;} let iv_format_datetime = new abap.types.Character(1, {"qualifiedName":"ABAP_BOOL","ddicName":"ABAP_BOOL"}); if (INPUT && INPUT.iv_format_datetime) {iv_format_datetime.set(INPUT.iv_format_datetime);} if (INPUT === undefined || INPUT.iv_format_datetime === undefined) {iv_format_datetime = abap.builtin.abap_true;} let iv_to_abap_corresponding_only = new abap.types.Character(1, {"qualifiedName":"ABAP_BOOL","ddicName":"ABAP_BOOL"}); if (INPUT && INPUT.iv_to_abap_corresponding_only) {iv_to_abap_corresponding_only.set(INPUT.iv_to_abap_corresponding_only);} if (INPUT === undefined || INPUT.iv_to_abap_corresponding_only === undefined) {iv_to_abap_corresponding_only = abap.builtin.abap_false;} ro_instance.set(await (new abap.Classes['ZCL_ABAPGIT_AJSON']()).constructor_({iv_to_abap_corresponding_only: iv_to_abap_corresponding_only, iv_format_datetime: iv_format_datetime, iv_keep_item_order: iv_keep_item_order})); ro_instance.get().FRIENDS_ACCESS_INSTANCE["mi_custom_mapping"].set(ii_custom_mapping); return ro_instance; } async create_from(INPUT) { return zcl_abapgit_ajson.create_from(INPUT); } static async create_from(INPUT) { let ro_instance = new abap.types.ABAPObject({qualifiedName: "ZCL_ABAPGIT_AJSON", RTTIName: "\\CLASS=ZCL_ABAPGIT_AJSON"}); let ii_source_json = INPUT?.ii_source_json; if (ii_source_json?.getQualifiedName === undefined || ii_source_json.getQualifiedName() !== "ZIF_ABAPGIT_AJSON") { ii_source_json = undefined; } if (ii_source_json === undefined) { ii_source_json = new abap.types.ABAPObject({qualifiedName: "ZIF_ABAPGIT_AJSON", RTTIName: "\\INTERFACE=ZIF_ABAPGIT_AJSON"}).set(INPUT.ii_source_json); } let ii_filter = new abap.types.ABAPObject({qualifiedName: "ZIF_ABAPGIT_AJSON_FILTER", RTTIName: "\\INTERFACE=ZIF_ABAPGIT_AJSON_FILTER"}); if (INPUT && INPUT.ii_filter) {ii_filter.set(INPUT.ii_filter);} let ii_mapper = new abap.types.ABAPObject({qualifiedName: "ZIF_ABAPGIT_AJSON_MAPPING", RTTIName: "\\INTERFACE=ZIF_ABAPGIT_AJSON_MAPPING"}); if (INPUT && INPUT.ii_mapper) {ii_mapper.set(INPUT.ii_mapper);} let lo_mutator_queue = new abap.types.ABAPObject({qualifiedName: "LCL_MUTATOR_QUEUE", RTTIName: "\\CLASS-POOL=ZCL_ABAPGIT_AJSON\\CLASS=LCL_MUTATOR_QUEUE"}); if (abap.compare.initial(ii_source_json)) { await abap.Classes['ZCX_ABAPGIT_AJSON_ERROR'].raise({iv_msg: abap.CharacterFactory.get(16, 'Source not bound')}); } ro_instance.set(await (new abap.Classes['ZCL_ABAPGIT_AJSON']()).constructor_({iv_to_abap_corresponding_only: ((await ii_source_json.get().zif_abapgit_ajson$opts())).get().to_abap_corresponding_only, iv_format_datetime: ((await ii_source_json.get().zif_abapgit_ajson$opts())).get().format_datetime, iv_keep_item_order: ((await ii_source_json.get().zif_abapgit_ajson$opts())).get().keep_item_order})); if (abap.compare.initial(ii_filter) && abap.compare.initial(ii_mapper)) { ro_instance.get().zif_abapgit_ajson$mt_json_tree.set(ii_source_json.get().zif_abapgit_ajson$mt_json_tree); } else { lo_mutator_queue.set(await (new abap.Classes['CLAS-ZCL_ABAPGIT_AJSON-LCL_MUTATOR_QUEUE']()).constructor_()); if (abap.compare.initial(ii_mapper) === false) { await lo_mutator_queue.get().add({ii_mutator: (await abap.Classes['CLAS-ZCL_ABAPGIT_AJSON-LCL_MAPPER_RUNNER'].new({ii_mapper: ii_mapper}))}); } if (abap.compare.initial(ii_filter) === false) { await lo_mutator_queue.get().add({ii_mutator: (await abap.Classes['CLAS-ZCL_ABAPGIT_AJSON-LCL_FILTER_RUNNER'].new({ii_filter: ii_filter}))}); } await lo_mutator_queue.get().lif_mutator_runner$run({it_source_tree: ii_source_json.get().zif_abapgit_ajson$mt_json_tree, et_dest_tree: ro_instance.get().zif_abapgit_ajson$mt_json_tree}); } return ro_instance; } async #delete_subtree(INPUT) { let rs_top_node = new abap.types.Structure({ "path": new abap.types.String({qualifiedName: "ZIF_ABAPGIT_AJSON_TYPES=>TY_NODE-PATH"}), "name": new abap.types.String({qualifiedName: "ZIF_ABAPGIT_AJSON_TYPES=>TY_NODE-NAME"}), "type": new abap.types.String({qualifiedName: "ZIF_ABAPGIT_AJSON_TYPES=>TY_NODE_TYPE"}), "value": new abap.types.String({qualifiedName: "ZIF_ABAPGIT_AJSON_TYPES=>TY_NODE-VALUE"}), "index": new abap.types.Integer({qualifiedName: "ZIF_ABAPGIT_AJSON_TYPES=>TY_NODE-INDEX"}), "order": new abap.types.Integer({qualifiedName: "ZIF_ABAPGIT_AJSON_TYPES=>TY_NODE-ORDER"}), "children": new abap.types.Integer({qualifiedName: "ZIF_ABAPGIT_AJSON_TYPES=>TY_NODE-CHILDREN"})}, "zif_abapgit_ajson_types=>ty_node", undefined, {}, {}); let iv_path = INPUT?.iv_path; if (iv_path?.getQualifiedName === undefined || iv_path.getQualifiedName() !== "STRING") { iv_path = undefined; } if (iv_path === undefined) { iv_path = new abap.types.String({qualifiedName: "STRING"}).set(INPUT.iv_path); } let iv_name = INPUT?.iv_name; if (iv_name?.getQualifiedName === undefined || iv_name.getQualifiedName() !== "STRING") { iv_name = undefined; } if (iv_name === undefined) { iv_name = new abap.types.String({qualifiedName: "STRING"}).set(INPUT.iv_name); } let ir_parent = new abap.types.DataReference(new abap.types.Structure({ "path": new abap.types.String({qualifiedName: "ZIF_ABAPGIT_AJSON_TYPES=>TY_NODE-PATH"}), "name": new abap.types.String({qualifiedName: "ZIF_ABAPGIT_AJSON_TYPES=>TY_NODE-NAME"}), "type": new abap.types.String({qualifiedName: "ZIF_ABAPGIT_AJSON_TYPES=>TY_NODE_TYPE"}), "value": new abap.types.String({qualifiedName: "ZIF_ABAPGIT_AJSON_TYPES=>TY_NODE-VALUE"}), "index": new abap.types.Integer({qualifiedName: "ZIF_ABAPGIT_AJSON_TYPES=>TY_NODE-INDEX"}), "order": new abap.types.Integer({qualifiedName: "ZIF_ABAPGIT_AJSON_TYPES=>TY_NODE-ORDER"}), "children": new abap.types.Integer({qualifiedName: "ZIF_ABAPGIT_AJSON_TYPES=>TY_NODE-CHILDREN"})}, "zif_abapgit_ajson_types=>ty_node", undefined, {}, {})); if (INPUT && INPUT.ir_parent) {ir_parent.set(INPUT.ir_parent);} let lv_parent_path = new abap.types.String({qualifiedName: "STRING"}); let lr_parent = new abap.types.DataReference(new abap.types.Structure({ "path": new abap.types.String({qualifiedName: "ZIF_ABAPGIT_AJSON_TYPES=>TY_NODE-PATH"}), "name": new abap.types.String({qualifiedName: "ZIF_ABAPGIT_AJSON_TYPES=>TY_NODE-NAME"}), "type": new abap.types.String({qualifiedName: "ZIF_ABAPGIT_AJSON_TYPES=>TY_NODE_TYPE"}), "value": new abap.types.String({qualifiedName: "ZIF_ABAPGIT_AJSON_TYPES=>TY_NODE-VALUE"}), "index": new abap.types.Integer({qualifiedName: "ZIF_ABAPGIT_AJSON_TYPES=>TY_NODE-INDEX"}), "order": new abap.types.Integer({qualifiedName: "ZIF_ABAPGIT_AJSON_TYPES=>TY_NODE-ORDER"}), "children": new abap.types.Integer({qualifiedName: "ZIF_ABAPGIT_AJSON_TYPES=>TY_NODE-CHILDREN"})}, "zif_abapgit_ajson_types=>ty_node", undefined, {}, {})); abap.statements.readTable(this.mt_json_tree,{withTableKey: true, into: rs_top_node, withKey: (i) => {return abap.compare.eq(i.path, iv_path) && abap.compare.eq(i.name, iv_name);}, withKeyValue: [{key: (i) => {return i.path}, value: iv_path},{key: (i) => {return i.name}, value: iv_name}], usesTableLine: false, withKeySimple: {"path": iv_path,"name": iv_name}}); if (abap.compare.ne(abap.builtin.sy.get().subrc, abap.IntegerFactory.get(0))) { return rs_top_node; } await abap.statements.deleteInternal(this.mt_json_tree,{index: abap.builtin.sy.get().tabix}); if (abap.compare.gt(rs_top_node.get().children, abap.IntegerFactory.get(0))) { lv_parent_path.set(abap.operators.concat(iv_path,abap.operators.concat(iv_name,abap.CharacterFactory.get(2, '/*')))); await abap.statements.deleteInternal(this.mt_json_tree,{where: async (I) => {return abap.compare.cp(I.path, lv_parent_path);}}); } if (INPUT && INPUT.ir_parent) { ir_parent.get().children.set(abap.operators.minus(ir_parent.get().children,abap.IntegerFactory.get(1))); } else { lr_parent.set((await this.#get_item({iv_path: iv_path}))); if (abap.compare.initial(lr_parent) === false) { lr_parent.get().children.set(abap.operators.minus(lr_parent.get().children,abap.IntegerFactory.get(1))); } } return rs_top_node; } async #get_item(INPUT) { let rv_item = new abap.types.DataReference(new abap.types.Structure({ "path": new abap.types.String({qualifiedName: "ZIF_ABAPGIT_AJSON_TYPES=>TY_NODE-PATH"}), "name": new abap.types.String({qualifiedName: "ZIF_ABAPGIT_AJSON_TYPES=>TY_NODE-NAME"}), "type": new abap.types.String({qualifiedName: "ZIF_ABAPGIT_AJSON_TYPES=>TY_NODE_TYPE"}), "value": new abap.types.String({qualifiedName: "ZIF_ABAPGIT_AJSON_TYPES=>TY_NODE-VALUE"}), "index": new abap.types.Integer({qualifiedName: "ZIF_ABAPGIT_AJSON_TYPES=>TY_NODE-INDEX"}), "order": new abap.types.Integer({qualifiedName: "ZIF_ABAPGIT_AJSON_TYPES=>TY_NODE-ORDER"}), "children": new abap.types.Integer({qualifiedName: "ZIF_ABAPGIT_AJSON_TYPES=>TY_NODE-CHILDREN"})}, "zif_abapgit_ajson_types=>ty_node", undefined, {}, {})); let iv_path = INPUT?.iv_path; if (iv_path?.getQualifiedName === undefined || iv_path.getQualifiedName() !== "STRING") { iv_path = undefined; } if (iv_path === undefined) { iv_path = new abap.types.String({qualifiedName: "STRING"}).set(INPUT.iv_path); } let fs_item_ = new abap.types.FieldSymbol(new abap.types.Structure({ "path": new abap.types.String({qualifiedName: "ZIF_ABAPGIT_AJSON_TYPES=>TY_NODE-PATH"}), "name": new abap.types.String({qualifiedName: "ZIF_ABAPGIT_AJSON_TYPES=>TY_NODE-NAME"}), "type": new abap.types.String({qualifiedName: "ZIF_ABAPGIT_AJSON_TYPES=>TY_NODE_TYPE"}), "value": new abap.types.String({qualifiedName: "ZIF_ABAPGIT_AJSON_TYPES=>TY_NODE-VALUE"}), "index": new abap.types.Integer({qualifiedName: "ZIF_ABAPGIT_AJSON_TYPES=>TY_NODE-INDEX"}), "order": new abap.types.Integer({qualifiedName: "ZIF_ABAPGIT_AJSON_TYPES=>TY_NODE-ORDER"}), "children": new abap.types.Integer({qualifiedName: "ZIF_ABAPGIT_AJSON_TYPES=>TY_NODE-CHILDREN"})}, "zif_abapgit_ajson_types=>ty_node", undefined, {}, {})); let ls_path_name = new abap.types.Structure({ "path": new abap.types.String({qualifiedName: "ZIF_ABAPGIT_AJSON_TYPES=>TY_PATH_NAME-PATH"}), "name": new abap.types.String({qualifiedName: "ZIF_ABAPGIT_AJSON_TYPES=>TY_PATH_NAME-NAME"})}, "zif_abapgit_ajson_types=>ty_path_name", undefined, {}, {}); ls_path_name.set((await abap.Classes['CLAS-ZCL_ABAPGIT_AJSON-LCL_UTILS'].split_path({iv_path: iv_path}))); abap.statements.readTable(this.mt_json_tree,{assigning: fs_item_, withKey: (i) => {return abap.compare.eq(i.path, ls_path_name.get().path) && abap.compare.eq(i.name, ls_path_name.get().name);}, withKeyValue: [{key: (i) => {return i.path}, value: ls_path_name.get().path},{key: (i) => {return i.name}, value: ls_path_name.get().name}], usesTableLine: false, withKeySimple: {"path": ls_path_name.get().path,"name": ls_path_name.get().name}}); if (abap.compare.eq(abap.builtin.sy.get().subrc, abap.IntegerFactory.get(0))) { rv_item.assign(fs_item_.getPointer()); } return rv_item; } async new(INPUT) { return zcl_abapgit_ajson.new(INPUT); } static async new(INPUT) { let ro_instance = new abap.types.ABAPObject({qualifiedName: "ZCL_ABAPGIT_AJSON", RTTIName: "\\CLASS=ZCL_ABAPGIT_AJSON"}); let iv_keep_item_order = new abap.types.Character(1, {"qualifiedName":"ABAP_BOOL","ddicName":"ABAP_BOOL"}); if (INPUT && INPUT.iv_keep_item_order) {iv_keep_item_order.set(INPUT.iv_keep_item_order);} if (INPUT === undefined || INPUT.iv_keep_item_order === undefined) {iv_keep_item_order = abap.builtin.abap_false;} let iv_format_datetime = new abap.types.Character(1, {"qualifiedName":"ABAP_BOOL","ddicName":"ABAP_BOOL"}); if (INPUT && INPUT.iv_format_datetime) {iv_format_datetime.set(INPUT.iv_format_datetime);} if (INPUT === undefined || INPUT.iv_format_datetime === undefined) {iv_format_datetime = abap.builtin.abap_true;} let iv_to_abap_corresponding_only = new abap.types.Character(1, {"qualifiedName":"ABAP_BOOL","ddicName":"ABAP_BOOL"}); if (INPUT && INPUT.iv_to_abap_corresponding_only) {iv_to_abap_corresponding_only.set(INPUT.iv_to_abap_corresponding_only);} if (INPUT === undefined || INPUT.iv_to_abap_corresponding_only === undefined) {iv_to_abap_corresponding_only = abap.builtin.abap_false;} ro_instance.set(await (new abap.Classes['ZCL_ABAPGIT_AJSON']()).constructor_({iv_to_abap_corresponding_only: iv_to_abap_corresponding_only, iv_format_datetime: iv_format_datetime, iv_keep_item_order: iv_keep_item_order})); return ro_instance; } async parse(INPUT) { return zcl_abapgit_ajson.parse(INPUT); } static async parse(INPUT) { let ro_instance = new abap.types.ABAPObject({qualifiedName: "ZCL_ABAPGIT_AJSON", RTTIName: "\\CLASS=ZCL_ABAPGIT_AJSON"}); let iv_json = INPUT?.iv_json; let iv_freeze = new abap.types.Character(1, {"qualifiedName":"ABAP_BOOL","ddicName":"ABAP_BOOL"}); if (INPUT && INPUT.iv_freeze) {iv_freeze.set(INPUT.iv_freeze);} if (INPUT === undefined || INPUT.iv_freeze === undefined) {iv_freeze = abap.builtin.abap_false;} let ii_custom_mapping = new abap.types.ABAPObject({qualifiedName: "ZIF_ABAPGIT_AJSON_MAPPING", RTTIName: "\\INTERFACE=ZIF_ABAPGIT_AJSON_MAPPING"}); if (INPUT && INPUT.ii_custom_mapping) {ii_custom_mapping.set(INPUT.ii_custom_mapping);} let iv_keep_item_order = new abap.types.Character(1, {"qualifiedName":"ABAP_BOOL","ddicName":"ABAP_BOOL"}); if (INPUT && INPUT.iv_keep_item_order) {iv_keep_item_order.set(INPUT.iv_keep_item_order);} if (INPUT === undefined || INPUT.iv_keep_item_order === undefined) {iv_keep_item_order = abap.builtin.abap_false;} let lo_parser = new abap.types.ABAPObject({qualifiedName: "LCL_JSON_PARSER", RTTIName: "\\CLASS-POOL=ZCL_ABAPGIT_AJSON\\CLASS=LCL_JSON_PARSER"}); ro_instance.set(await (new abap.Classes['ZCL_ABAPGIT_AJSON']()).constructor_()); lo_parser.set(await (new abap.Classes['CLAS-ZCL_ABAPGIT_AJSON-LCL_JSON_PARSER']()).constructor_()); ro_instance.get().zif_abapgit_ajson$mt_json_tree.set((await lo_parser.get().parse({iv_json: iv_json, iv_keep_item_order: iv_keep_item_order}))); ro_instance.get().FRIENDS_ACCESS_INSTANCE["mi_custom_mapping"].set(ii_custom_mapping); ro_instance.get().FRIENDS_ACCESS_INSTANCE["ms_opts"].get().keep_item_order.set(iv_keep_item_order); if (abap.compare.eq(iv_freeze, abap.builtin.abap_true)) { await ro_instance.get().zif_abapgit_ajson$freeze(); } return ro_instance; } async #prove_path_exists(INPUT) { let rr_end_node = new abap.types.DataReference(new abap.types.Structure({ "path": new abap.types.String({qualifiedName: "ZIF_ABAPGIT_AJSON_TYPES=>TY_NODE-PATH"}), "name": new abap.types.String({qualifiedName: "ZIF_ABAPGIT_AJSON_TYPES=>TY_NODE-NAME"}), "type": new abap.types.String({qualifiedName: "ZIF_ABAPGIT_AJSON_TYPES=>TY_NODE_TYPE"}), "value": new abap.types.String({qualifiedName: "ZIF_ABAPGIT_AJSON_TYPES=>TY_NODE-VALUE"}), "index": new abap.types.Integer({qualifiedName: "ZIF_ABAPGIT_AJSON_TYPES=>TY_NODE-INDEX"}), "order": new abap.types.Integer({qualifiedName: "ZIF_ABAPGIT_AJSON_TYPES=>TY_NODE-ORDER"}), "children": new abap.types.Integer({qualifiedName: "ZIF_ABAPGIT_AJSON_TYPES=>TY_NODE-CHILDREN"})}, "zif_abapgit_ajson_types=>ty_node", undefined, {}, {})); let iv_path = INPUT?.iv_path; if (iv_path?.getQualifiedName === undefined || iv_path.getQualifiedName() !== "STRING") { iv_path = undefined; } if (iv_path === undefined) { iv_path = new abap.types.String({qualifiedName: "STRING"}).set(INPUT.iv_path); } let lt_path = abap.types.TableFactory.construct(new abap.types.String({qualifiedName: "STRING"}), {"withHeader":false,"keyType":"DEFAULT","primaryKey":{"isUnique":false,"type":"STANDARD","keyFields":[],"name":"primary_key"},"secondary":[]}, "STRING_TABLE"); let lr_node_parent = new abap.types.DataReference(new abap.types.Structure({ "path": new abap.types.String({qualifiedName: "ZIF_ABAPGIT_AJSON_TYPES=>TY_NODE-PATH"}), "name": new abap.types.String({qualifiedName: "ZIF_ABAPGIT_AJSON_TYPES=>TY_NODE-NAME"}), "type": new abap.types.String({qualifiedName: "ZIF_ABAPGIT_AJSON_TYPES=>TY_NODE_TYPE"}), "value": new abap.types.String({qualifiedName: "ZIF_ABAPGIT_AJSON_TYPES=>TY_NODE-VALUE"}), "index": new abap.types.Integer({qualifiedName: "ZIF_ABAPGIT_AJSON_TYPES=>TY_NODE-INDEX"}), "order": new abap.types.Integer({qualifiedName: "ZIF_ABAPGIT_AJSON_TYPES=>TY_NODE-ORDER"}), "children": new abap.types.Integer({qualifiedName: "ZIF_ABAPGIT_AJSON_TYPES=>TY_NODE-CHILDREN"})}, "zif_abapgit_ajson_types=>ty_node", undefined, {}, {})); let lv_cur_path = new abap.types.String({qualifiedName: "STRING"}); let lv_cur_name = new abap.types.String({qualifiedName: "STRING"}); let ls_new_node = new abap.types.Structure({ "path": new abap.types.String({qualifiedName: "ZIF_ABAPGIT_AJSON_TYPES=>TY_NODE-PATH"}), "name": new abap.types.String({qualifiedName: "ZIF_ABAPGIT_AJSON_TYPES=>TY_NODE-NAME"}), "type": new abap.types.String({qualifiedName: "ZIF_ABAPGIT_AJSON_TYPES=>TY_NODE_TYPE"}), "value": new abap.types.String({qualifiedName: "ZIF_ABAPGIT_AJSON_TYPES=>TY_NODE-VALUE"}), "index": new abap.types.Integer({qualifiedName: "ZIF_ABAPGIT_AJSON_TYPES=>TY_NODE-INDEX"}), "order": new abap.types.Integer({qualifiedName: "ZIF_ABAPGIT_AJSON_TYPES=>TY_NODE-ORDER"}), "children": new abap.types.Integer({qualifiedName: "ZIF_ABAPGIT_AJSON_TYPES=>TY_NODE-CHILDREN"})}, "zif_abapgit_ajson_types=>ty_node", undefined, {}, {}); abap.statements.split({source: iv_path, at: abap.CharacterFactory.get(1, '/'), table: lt_path}); await abap.statements.deleteInternal(lt_path,{where: async (I) => {return abap.compare.initial(I.table_line);}}); const indexBackup1 = abap.builtin.sy.get().index.get(); let unique275 = 1; while (true) { abap.builtin.sy.get().index.set(unique275++); lr_node_parent.set(rr_end_node); abap.statements.readTable(this.mt_json_tree,{withTableKey: true, referenceInto: rr_end_node, withKey: (i) => {return abap.compare.eq(i.path, lv_cur_path) && abap.compare.eq(i.name, lv_cur_name);}, withKeyValue: [{key: (i) => {return i.path}, value: lv_cur_path},{key: (i) => {return i.name}, value: lv_cur_name}], usesTableLine: false, withKeySimple: {"path": lv_cur_path,"name": lv_cur_name}}); if (abap.compare.ne(abap.builtin.sy.get().subrc, abap.IntegerFactory.get(0))) { ls_new_node.clear(); if (abap.compare.initial(lr_node_parent) === false) { lr_node_parent.get().children.set(abap.operators.add(lr_node_parent.get().children,abap.IntegerFactory.get(1))); if (abap.compare.eq(lr_node_parent.get().type, abap.Classes['ZIF_ABAPGIT_AJSON_TYPES'].zif_abapgit_ajson_types$node_type.get().array)) { ls_new_node.get().index.set((await abap.Classes['CLAS-ZCL_ABAPGIT_AJSON-LCL_UTILS'].validate_array_index({iv_path: lv_cur_path, iv_index: lv_cur_name}))); } } ls_new_node.get().path.set(lv_cur_path); ls_new_node.get().name.set(lv_cur_name); ls_new_node.get().type.set(abap.Classes['ZIF_ABAPGIT_AJSON_TYPES'].zif_abapgit_ajson_types$node_type.get().object); abap.statements.insertInternal({data: ls_new_node, referenceInto: rr_end_node, table: this.mt_json_tree}); } lv_cur_path.set(abap.operators.concat(lv_cur_path,abap.operators.concat(lv_cur_name,abap.CharacterFactory.get(1, '/')))); abap.statements.readTable(lt_path,{index: abap.builtin.sy.get().index, into: lv_cur_name}); if (abap.compare.ne(abap.builtin.sy.get().subrc, abap.IntegerFactory.get(0))) { break; } } abap.builtin.sy.get().index.set(indexBackup1); return rr_end_node; } async #read_only_watchdog() { if (abap.compare.eq(this.#ms_opts.get().read_only, abap.builtin.abap_true)) { await abap.Classes['ZCX_ABAPGIT_AJSON_ERROR'].raise({iv_msg: abap.CharacterFactory.get(31, 'This json instance is read only')}); } } async zif_abapgit_ajson$array_to_string_table(INPUT) { let rt_string_table = abap.types.TableFactory.construct(new abap.types.String({qualifiedName: "STRING"}), {"withHeader":false,"keyType":"DEFAULT","primaryKey":{"isUnique":false,"type":"STANDARD","keyFields":[],"name":"primary_key"},"secondary":[]}, "STRING_TABLE"); let iv_path = INPUT?.iv_path; if (iv_path?.getQualifiedName === undefined || iv_path.getQualifiedName() !== "STRING") { iv_path = undefined; } if (iv_path === undefined) { iv_path = new abap.types.String({qualifiedName: "STRING"}).set(INPUT.iv_path); } let lv_normalized_path = new abap.types.String({qualifiedName: "STRING"}); let lr_node = new abap.types.DataReference(new abap.types.Structure({ "path": new abap.types.String({qualifiedName: "ZIF_ABAPGIT_AJSON_TYPES=>TY_NODE-PATH"}), "name": new abap.types.String({qualifiedName: "ZIF_ABAPGIT_AJSON_TYPES=>TY_NODE-NAME"}), "type": new abap.types.String({qualifiedName: "ZIF_ABAPGIT_AJSON_TYPES=>TY_NODE_TYPE"}), "value": new abap.types.String({qualifiedName: "ZIF_ABAPGIT_AJSON_TYPES=>TY_NODE-VALUE"}), "index": new abap.types.Integer({qualifiedName: "ZIF_ABAPGIT_AJSON_TYPES=>TY_NODE-INDEX"}), "order": new abap.types.Integer({qualifiedName: "ZIF_ABAPGIT_AJSON_TYPES=>TY_NODE-ORDER"}), "children": new abap.types.Integer({qualifiedName: "ZIF_ABAPGIT_AJSON_TYPES=>TY_NODE-CHILDREN"})}, "zif_abapgit_ajson_types=>ty_node", undefined, {}, {})); let fs_item_ = new abap.types.FieldSymbol(new abap.types.Structure({ "path": new abap.types.String({qualifiedName: "ZIF_ABAPGIT_AJSON_TYPES=>TY_NODE-PATH"}), "name": new abap.types.String({qualifiedName: "ZIF_ABAPGIT_AJSON_TYPES=>TY_NODE-NAME"}), "type": new abap.types.String({qualifiedName: "ZIF_ABAPGIT_AJSON_TYPES=>TY_NODE_TYPE"}), "value": new abap.types.String({qualifiedName: "ZIF_ABAPGIT_AJSON_TYPES=>TY_NODE-VALUE"}), "index": new abap.types.Integer({qualifiedName: "ZIF_ABAPGIT_AJSON_TYPES=>TY_NODE-INDEX"}), "order": new abap.types.Integer({qualifiedName: "ZIF_ABAPGIT_AJSON_TYPES=>TY_NODE-ORDER"}), "children": new abap.types.Integer({qualifiedName: "ZIF_ABAPGIT_AJSON_TYPES=>TY_NODE-CHILDREN"})}, "zif_abapgit_ajson_types=>ty_node", undefined, {}, {})); lv_normalized_path.set((await abap.Classes['CLAS-ZCL_ABAPGIT_AJSON-LCL_UTILS'].normalize_path({iv_path: iv_path}))); lr_node.set((await this.#get_item({iv_path: iv_path}))); if (abap.compare.initial(lr_node)) { await abap.Classes['ZCX_ABAPGIT_AJSON_ERROR'].raise({iv_msg: new abap.types.String().set(`Path not found: ${abap.templateFormatting(iv_path)}`)}); } if (abap.compare.ne(lr_node.get().type, abap.Classes['ZIF_ABAPGIT_AJSON_TYPES'].zif_abapgit_ajson_types$node_type.get().array)) { await abap.Classes['ZCX_ABAPGIT_AJSON_ERROR'].raise({iv_msg: new abap.types.String().set(`Array expected at: ${abap.templateFormatting(iv_path)}`)}); } for await (const unique276 of abap.statements.loop(this.mt_json_tree,{where: async (I) => {return abap.compare.eq(I.path, lv_normalized_path);},topEquals: {"path": lv_normalized_path}})) { fs_item_.assign(unique276); let unique277 = fs_item_.get().type; if (abap.compare.eq(unique277, abap.Classes['ZIF_ABAPGIT_AJSON_TYPES'].zif_abapgit_ajson_types$node_type.get().number) || abap.compare.eq(unique277, abap.Classes['ZIF_ABAPGIT_AJSON_TYPES'].zif_abapgit_ajson_types$node_type.get().string)) { abap.statements.append({source: fs_item_.get().value, target: rt_string_table}); } else if (abap.compare.eq(unique277, abap.Classes['ZIF_ABAPGIT_AJSON_TYPES'].zif_abapgit_ajson_types$node_type.get().null)) { abap.statements.append({source: abap.CharacterFactory.get(1, ''), target: rt_string_table}); } else if (abap.compare.eq(unique277, abap.Classes['ZIF_ABAPGIT_AJSON_TYPES'].zif_abapgit_ajson_types$node_type.get().boolean)) { let lv_tmp = new abap.types.String({qualifiedName: "STRING"}); if (abap.compare.eq(fs_item_.get().value, abap.CharacterFactory.get(4, 'true'))) { lv_tmp.set(abap.builtin.abap_true); } else { lv_tmp.clear(); } abap.statements.append({source: lv_tmp, target: rt_string_table}); } else { await abap.Classes['ZCX_ABAPGIT_AJSON_ERROR'].raise({iv_msg: new abap.types.String().set(`Cannot convert [${abap.templateFormatting(fs_item_.get().type)}] to string at [${abap.templateFormatting(fs_item_.get().path)}${abap.templateFormatting(fs_item_.get().name)}]`)}); } } return rt_string_table; } async zif_abapgit_ajson$clear() { await this.#read_only_watchdog(); this.mt_json_tree.clear(); } async zif_abapgit_ajson$clone() { let ri_json = new abap.types.ABAPObject({qualifiedName: "ZIF_ABAPGIT_AJSON", RTTIName: "\\INTERFACE=ZIF_ABAPGIT_AJSON"}); ri_json.set((await this.create_from({ii_source_json: this.me}))); return ri_json; } async zif_abapgit_ajson$delete(INPUT) { let ri_json = new abap.types.ABAPObject({qualifiedName: "ZIF_ABAPGIT_AJSON", RTTIName: "\\INTERFACE=ZIF_ABAPGIT_AJSON"}); let iv_path = INPUT?.iv_path; if (iv_path?.getQualifiedName === undefined || iv_path.getQualifiedName() !== "STRING") { iv_path = undefined; } if (iv_path === undefined) { iv_path = new abap.types.String({qualifiedName: "STRING"}).set(INPUT.iv_path); } await this.#read_only_watchdog(); let ls_split_path = new abap.types.Structure({ "path": new abap.types.String({qualifiedName: "ZIF_ABAPGIT_AJSON_TYPES=>TY_PATH_NAME-PATH"}), "name": new abap.types.String({qualifiedName: "ZIF_ABAPGIT_AJSON_TYPES=>TY_PATH_NAME-NAME"})}, "zif_abapgit_ajson_types=>ty_path_name", undefined, {}, {}); ls_split_path.set((await abap.Classes['CLAS-ZCL_ABAPGIT_AJSON-LCL_UTILS'].split_path({iv_path: iv_path}))); await this.#delete_subtree({iv_path: ls_split_path.get().path, iv_name: ls_split_path.get().name}); ri_json.set(this.me); return ri_json; } async zif_abapgit_ajson$exists(INPUT) { let rv_exists = new abap.types.Character(1, {"qualifiedName":"ABAP_BOOL","ddicName":"ABAP_BOOL"}); let iv_path = INPUT?.iv_path; if (iv_path?.getQualifiedName === undefined || iv_path.getQualifiedName() !== "STRING") { iv_path = undefined; } if (iv_path === undefined) { iv_path = new abap.types.String({qualifiedName: "STRING"}).set(INPUT.iv_path); } rv_exists.set(abap.builtin.boolc(abap.compare.initial((await this.#get_item({iv_path: iv_path}))) === false)); return rv_exists; } async zif_abapgit_ajson$filter(INPUT) { let ri_json = new abap.types.ABAPObject({qualifiedName: "ZIF_ABAPGIT_AJSON", RTTIName: "\\INTERFACE=ZIF_ABAPGIT_AJSON"}); let ii_filter = INPUT?.ii_filter; if (ii_filter?.getQualifiedName === undefined || ii_filter.getQualifiedName() !== "ZIF_ABAPGIT_AJSON_FILTER") { ii_filter = undefined; } if (ii_filter === undefined) { ii_filter = new abap.types.ABAPObject({qualifiedName: "ZIF_ABAPGIT_AJSON_FILTER", RTTIName: "\\INTERFACE=ZIF_ABAPGIT_AJSON_FILTER"}).set(INPUT.ii_filter); } ri_json.set((await this.create_from({ii_source_json: this.me, ii_filter: ii_filter}))); return ri_json; } async zif_abapgit_ajson$format_datetime(INPUT) { let ri_json = new abap.types.ABAPObject({qualifiedName: "ZIF_ABAPGIT_AJSON", RTTIName: "\\INTERFACE=ZIF_ABAPGIT_AJSON"}); let iv_use_iso = new abap.types.Character(1, {"qualifiedName":"ABAP_BOOL","ddicName":"ABAP_BOOL"}); if (INPUT && INPUT.iv_use_iso) {iv_use_iso.set(INPUT.iv_use_iso);} if (INPUT === undefined || INPUT.iv_use_iso === undefined) {iv_use_iso = abap.builtin.abap_true;} this.#ms_opts.get().format_datetime.set(iv_use_iso); ri_json.set(this.me); return ri_json; } async zif_abapgit_ajson$freeze() { this.#ms_opts.get().read_only.set(abap.builtin.abap_true); } async zif_abapgit_ajson$get(INPUT) { let rv_value = new abap.types.String({qualifiedName: "STRING"}); let iv_path = INPUT?.iv_path; if (iv_path?.getQualifiedName === undefined || iv_path.getQualifiedName() !== "STRING") { iv_path = undefined; } if (iv_path === undefined) { iv_path = new abap.types.String({qualifiedName: "STRING"}).set(INPUT.iv_path); } let lr_item = new abap.types.DataReference(new abap.types.Structure({ "path": new abap.types.String({qualifiedName: "ZIF_ABAPGIT_AJSON_TYPES=>TY_NODE-PATH"}), "name": new abap.types.String({qualifiedName: "ZIF_ABAPGIT_AJSON_TYPES=>TY_NODE-NAME"}), "type": new abap.types.String({qualifiedName: "ZIF_ABAPGIT_AJSON_TYPES=>TY_NODE_TYPE"}), "value": new abap.types.String({qualifiedName: "ZIF_ABAPGIT_AJSON_TYPES=>TY_NODE-VALUE"}), "index": new abap.types.Integer({qualifiedName: "ZIF_ABAPGIT_AJSON_TYPES=>TY_NODE-INDEX"}), "order": new abap.types.Integer({qualifiedName: "ZIF_ABAPGIT_AJSON_TYPES=>TY_NODE-ORDER"}), "children": new abap.types.Integer({qualifiedName: "ZIF_ABAPGIT_AJSON_TYPES=>TY_NODE-CHILDREN"})}, "zif_abapgit_ajson_types=>ty_node", undefined, {}, {})); lr_item.set((await this.#get_item({iv_path: iv_path}))); if (abap.compare.initial(lr_item) === false) { rv_value.set(lr_item.get().value); } return rv_value; } async zif_abapgit_ajson$get_boolean(INPUT) { let rv_value = new abap.types.Character(1, {"qualifiedName":"ABAP_BOOL","ddicName":"ABAP_BOOL"}); let iv_path = INPUT?.iv_path; if (iv_path?.getQualifiedName === undefined || iv_path.getQualifiedName() !== "STRING") { iv_path = undefined; } if (iv_path === undefined) { iv_path = new abap.types.String({qualifiedName: "STRING"}).set(INPUT.iv_path); } let lr_item = new abap.types.DataReference(new abap.types.Structure({ "path": new abap.types.String({qualifiedName: "ZIF_ABAPGIT_AJSON_TYPES=>TY_NODE-PATH"}), "name": new abap.types.String({qualifiedName: "ZIF_ABAPGIT_AJSON_TYPES=>TY_NODE-NAME"}), "type": new abap.types.String({qualifiedName: "ZIF_ABAPGIT_AJSON_TYPES=>TY_NODE_TYPE"}), "value": new abap.types.String({qualifiedName: "ZIF_ABAPGIT_AJSON_TYPES=>TY_NODE-VALUE"}), "index": new abap.types.Integer({qualifiedName: "ZIF_ABAPGIT_AJSON_TYPES=>TY_NODE-INDEX"}), "order": new abap.types.Integer({qualifiedName: "ZIF_ABAPGIT_AJSON_TYPES=>TY_NODE-ORDER"}), "children": new abap.types.Integer({qualifiedName: "ZIF_ABAPGIT_AJSON_TYPES=>TY_NODE-CHILDREN"})}, "zif_abapgit_ajson_types=>ty_node", undefined, {}, {})); lr_item.set((await this.#get_item({iv_path: iv_path}))); if (abap.compare.initial(lr_item) || abap.compare.eq(lr_item.get().type, abap.Classes['ZIF_ABAPGIT_AJSON_TYPES'].zif_abapgit_ajson_types$node_type.get().null)) { return rv_value; } else if (abap.compare.eq(lr_item.get().type, abap.Classes['ZIF_ABAPGIT_AJSON_TYPES'].zif_abapgit_ajson_types$node_type.get().boolean)) { rv_value.set(abap.builtin.boolc(abap.compare.eq(lr_item.get().value, abap.CharacterFactory.get(4, 'true')))); } else if (abap.compare.initial(lr_item.get().value) === false) { rv_value.set(abap.builtin.abap_true); } return rv_value; } async zif_abapgit_ajson$get_date(INPUT) { let rv_value = new abap.types.Date({qualifiedName: "D"}); let iv_path = INPUT?.iv_path; if (iv_path?.getQualifiedName === undefined || iv_path.getQualifiedName() !== "STRING") { iv_path = undefined; } if (iv_path === undefined) { iv_path = new abap.types.String({qualifiedName: "STRING"}).set(INPUT.iv_path); } let lr_item = new abap.types.DataReference(new abap.types.Structure({ "path": new abap.types.String({qualifiedName: "ZIF_ABAPGIT_AJSON_TYPES=>TY_NODE-PATH"}), "name": new abap.types.String({qualifiedName: "ZIF_ABAPGIT_AJSON_TYPES=>TY_NODE-NAME"}), "type": new abap.types.String({qualifiedName: "ZIF_ABAPGIT_AJSON_TYPES=>TY_NODE_TYPE"}), "value": new abap.types.String({qualifiedName: "ZIF_ABAPGIT_AJSON_TYPES=>TY_NODE-VALUE"}), "index": new abap.types.Integer({qualifiedName: "ZIF_ABAPGIT_AJSON_TYPES=>TY_NODE-INDEX"}), "order": new abap.types.Integer({qualifiedName: "ZIF_ABAPGIT_AJSON_TYPES=>TY_NODE-ORDER"}), "children": new abap.types.Integer({qualifiedName: "ZIF_ABAPGIT_AJSON_TYPES=>TY_NODE-CHILDREN"})}, "zif_abapgit_ajson_types=>ty_node", undefined, {}, {})); let lv_y = new abap.types.Character(4, {}); let lv_m = new abap.types.Character(2, {}); let lv_d = new abap.types.Character(2, {}); lr_item.set((await this.#get_item({iv_path: iv_path}))); if (abap.compare.initial(lr_item) === false && abap.compare.eq(lr_item.get().type, abap.Classes['ZIF_ABAPGIT_AJSON_TYPES'].zif_abapgit_ajson_types$node_type.get().string)) { abap.statements.find(lr_item.get().value, {regex: abap.CharacterFactory.get(29, '^(\\d{4})-(\\d{2})-(\\d{2})(T|$)'), first: true, submatches: [lv_y,lv_m,lv_d]}); abap.statements.concatenate({source: [lv_y, lv_m, lv_d], target: rv_value}); } return rv_value; } async zif_abapgit_ajson$get_integer(INPUT) { let rv_value = new abap.types.Integer({qualifiedName: "I"}); let iv_path = INPUT?.iv_path; if (iv_path?.getQualifiedName === undefined || iv_path.getQualifiedName() !== "STRING") { iv_path = undefined; } if (iv_path === undefined) { iv_path = new abap.types.String({qualifiedName: "STRING"}).set(INPUT.iv_path); } let lr_item = new abap.types.DataReference(new abap.types.Structure({ "path": new abap.types.String({qualifiedName: "ZIF_ABAPGIT_AJSON_TYPES=>TY_NODE-PATH"}), "name": new abap.types.String({qualifiedName: "ZIF_ABAPGIT_AJSON_TYPES=>TY_NODE-NAME"}), "type": new abap.types.String({qualifiedName: "ZIF_ABAPGIT_AJSON_TYPES=>TY_NODE_TYPE"}), "value": new abap.types.String({qualifiedName: "ZIF_ABAPGIT_AJSON_TYPES=>TY_NODE-VALUE"}), "index": new abap.types.Integer({qualifiedName: "ZIF_ABAPGIT_AJSON_TYPES=>TY_NODE-INDEX"}), "order": new abap.types.Integer({qualifiedName: "ZIF_ABAPGIT_AJSON_TYPES=>TY_NODE-ORDER"}), "children": new abap.types.Integer({qualifiedName: "ZIF_ABAPGIT_AJSON_TYPES=>TY_NODE-CHILDREN"})}, "zif_abapgit_ajson_types=>ty_node", undefined, {}, {})); lr_item.set((await this.#get_item({iv_path: iv_path}))); if (abap.compare.initial(lr_item) === false && abap.compare.eq(lr_item.get().type, abap.Classes['ZIF_ABAPGIT_AJSON_TYPES'].zif_abapgit_ajson_types$node_type.get().number)) { rv_value.set(lr_item.get().value); } return rv_value; } async zif_abapgit_ajson$get_node_type(INPUT) { let rv_node_type = new abap.types.String({qualifiedName: "ZIF_ABAPGIT_AJSON_TYPES=>TY_NODE_TYPE"}); let iv_path = INPUT?.iv_path; if (iv_path?.getQualifiedName === undefined || iv_path.getQualifiedName() !== "STRING") { iv_path = undefined; } if (iv_path === undefined) { iv_path = new abap.types.String({qualifiedName: "STRING"}).set(INPUT.iv_path); } let lr_item = new abap.types.DataReference(new abap.types.Structure({ "path": new abap.types.String({qualifiedName: "ZIF_ABAPGIT_AJSON_TYPES=>TY_NODE-PATH"}), "name": new abap.types.String({qualifiedName: "ZIF_ABAPGIT_AJSON_TYPES=>TY_NODE-NAME"}), "type": new abap.types.String({qualifiedName: "ZIF_ABAPGIT_AJSON_TYPES=>TY_NODE_TYPE"}), "value": new abap.types.String({qualifiedName: "ZIF_ABAPGIT_AJSON_TYPES=>TY_NODE-VALUE"}), "index": new abap.types.Integer({qualifiedName: "ZIF_ABAPGIT_AJSON_TYPES=>TY_NODE-INDEX"}), "order": new abap.types.Integer({qualifiedName: "ZIF_ABAPGIT_AJSON_TYPES=>TY_NODE-ORDER"}), "children": new abap.types.Integer({qualifiedName: "ZIF_ABAPGIT_AJSON_TYPES=>TY_NODE-CHILDREN"})}, "zif_abapgit_ajson_types=>ty_node", undefined, {}, {})); lr_item.set((await this.#get_item({iv_path: iv_path}))); if (abap.compare.initial(lr_item) === false) { rv_node_type.set(lr_item.get().type); } return rv_node_type; } async zif_abapgit_ajson$get_number(INPUT) { let rv_value = new abap.types.Float({qualifiedName: "F"}); let iv_path = INPUT?.iv_path; if (iv_path?.getQualifiedName === undefined || iv_path.getQualifiedName() !== "STRING") { iv_path = undefined; } if (iv_path === undefined) { iv_path = new abap.types.String({qualifiedName: "STRING"}).set(INPUT.iv_path); } let lr_item = new abap.types.DataReference(new abap.types.Structure({ "path": new abap.types.String({qualifiedName: "ZIF_ABAPGIT_AJSON_TYPES=>TY_NODE-PATH"}), "name": new abap.types.String({qualifiedName: "ZIF_ABAPGIT_AJSON_TYPES=>TY_NODE-NAME"}), "type": new abap.types.String({qualifiedName: "ZIF_ABAPGIT_AJSON_TYPES=>TY_NODE_TYPE"}), "value": new abap.types.String({qualifiedName: "ZIF_ABAPGIT_AJSON_TYPES=>TY_NODE-VALUE"}), "index": new abap.types.Integer({qualifiedName: "ZIF_ABAPGIT_AJSON_TYPES=>TY_NODE-INDEX"}), "order": new abap.types.Integer({qualifiedName: "ZIF_ABAPGIT_AJSON_TYPES=>TY_NODE-ORDER"}), "children": new abap.types.Integer({qualifiedName: "ZIF_ABAPGIT_AJSON_TYPES=>TY_NODE-CHILDREN"})}, "zif_abapgit_ajson_types=>ty_node", undefined, {}, {})); lr_item.set((await this.#get_item({iv_path: iv_path}))); if (abap.compare.initial(lr_item) === false && abap.compare.eq(lr_item.get().type, abap.Classes['ZIF_ABAPGIT_AJSON_TYPES'].zif_abapgit_ajson_types$node_type.get().number)) { rv_value.set(lr_item.get().value); } return rv_value; } async zif_abapgit_ajson$get_string(INPUT) { let rv_value = new abap.types.String({qualifiedName: "STRING"}); let iv_path = INPUT?.iv_path; if (iv_path?.getQualifiedName === undefined || iv_path.getQualifiedName() !== "STRING") { iv_path = undefined; } if (iv_path === undefined) { iv_path = new abap.types.String({qualifiedName: "STRING"}).set(INPUT.iv_path); } let lr_item = new abap.types.DataReference(new abap.types.Structure({ "path": new abap.types.String({qualifiedName: "ZIF_ABAPGIT_AJSON_TYPES=>TY_NODE-PATH"}), "name": new abap.types.String({qualifiedName: "ZIF_ABAPGIT_AJSON_TYPES=>TY_NODE-NAME"}), "type": new abap.types.String({qualifiedName: "ZIF_ABAPGIT_AJSON_TYPES=>TY_NODE_TYPE"}), "value": new abap.types.String({qualifiedName: "ZIF_ABAPGIT_AJSON_TYPES=>TY_NODE-VALUE"}), "index": new abap.types.Integer({qualifiedName: "ZIF_ABAPGIT_AJSON_TYPES=>TY_NODE-INDEX"}), "order": new abap.types.Integer({qualifiedName: "ZIF_ABAPGIT_AJSON_TYPES=>TY_NODE-ORDER"}), "children": new abap.types.Integer({qualifiedName: "ZIF_ABAPGIT_AJSON_TYPES=>TY_NODE-CHILDREN"})}, "zif_abapgit_ajson_types=>ty_node", undefined, {}, {})); lr_item.set((await this.#get_item({iv_path: iv_path}))); if (abap.compare.initial(lr_item) === false && abap.compare.ne(lr_item.get().type, abap.Classes['ZIF_ABAPGIT_AJSON_TYPES'].zif_abapgit_ajson_types$node_type.get().null)) { rv_value.set(lr_item.get().value); } return rv_value; } async zif_abapgit_ajson$get_timestamp(INPUT) { let rv_value = new abap.types.Packed({length: 15, decimals: 0, qualifiedName: "TIMESTAMP"}); let iv_path = INPUT?.iv_path; if (iv_path?.getQualifiedName === undefined || iv_path.getQualifiedName() !== "STRING") { iv_path = undefined; } if (iv_path === undefined) { iv_path = new abap.types.String({qualifiedName: "STRING"}).set(INPUT.iv_path); } let lo_to_abap = new abap.types.ABAPObject({qualifiedName: "LCL_JSON_TO_ABAP", RTTIName: "\\CLASS-POOL=ZCL_ABAPGIT_AJSON\\CLASS=LCL_JSON_TO_ABAP"}); let lr_item = new abap.types.DataReference(new abap.types.Structure({ "path": new abap.types.String({qualifiedName: "ZIF_ABAPGIT_AJSON_TYPES=>TY_NODE-PATH"}), "name": new abap.types.String({qualifiedName: "ZIF_ABAPGIT_AJSON_TYPES=>TY_NODE-NAME"}), "type": new abap.types.String({qualifiedName: "ZIF_ABAPGIT_AJSON_TYPES=>TY_NODE_TYPE"}), "value": new abap.types.String({qualifiedName: "ZIF_ABAPGIT_AJSON_TYPES=>TY_NODE-VALUE"}), "index": new abap.types.Integer({qualifiedName: "ZIF_ABAPGIT_AJSON_TYPES=>TY_NODE-INDEX"}), "order": new abap.types.Integer({qualifiedName: "ZIF_ABAPGIT_AJSON_TYPES=>TY_NODE-ORDER"}), "children": new abap.types.Integer({qualifiedName: "ZIF_ABAPGIT_AJSON_TYPES=>TY_NODE-CHILDREN"})}, "zif_abapgit_ajson_types=>ty_node", undefined, {}, {})); lr_item.set((await this.#get_item({iv_path: iv_path}))); if (abap.compare.initial(lr_item)) { return rv_value; } lo_to_abap.set(await (new abap.Classes['CLAS-ZCL_ABAPGIT_AJSON-LCL_JSON_TO_ABAP']()).constructor_()); try { rv_value.set((await lo_to_abap.get().to_timestamp({iv_value: lr_item.get().value}))); } catch (e) { if ((abap.Classes['ZCX_ABAPGIT_AJSON_ERROR'] && e instanceof abap.Classes['ZCX_ABAPGIT_AJSON_ERROR'])) { return rv_value; } else { throw e; } } return rv_value; } async zif_abapgit_ajson$is_empty() { let rv_yes = new abap.types.Character(1, {"qualifiedName":"ABAP_BOOL","ddicName":"ABAP_BOOL"}); rv_yes.set(abap.builtin.boolc(abap.compare.eq(abap.builtin.lines({val: this.mt_json_tree}), abap.IntegerFactory.get(0)))); return rv_yes; } async zif_abapgit_ajson$keep_item_order() { let ri_json = new abap.types.ABAPObject({qualifiedName: "ZIF_ABAPGIT_AJSON", RTTIName: "\\INTERFACE=ZIF_ABAPGIT_AJSON"}); this.#ms_opts.get().keep_item_order.set(abap.builtin.abap_true); ri_json.set(this.me); return ri_json; } async zif_abapgit_ajson$map(INPUT) { let ri_json = new abap.types.ABAPObject({qualifiedName: "ZIF_ABAPGIT_AJSON", RTTIName: "\\INTERFACE=ZIF_ABAPGIT_AJSON"}); let ii_mapper = INPUT?.ii_mapper; if (ii_mapper?.getQualifiedName === undefined || ii_mapper.getQualifiedName() !== "ZIF_ABAPGIT_AJSON_MAPPING") { ii_mapper = undefined; } if (ii_mapper === undefined) { ii_mapper = new abap.types.ABAPObject({qualifiedName: "ZIF_ABAPGIT_AJSON_MAPPING", RTTIName: "\\INTERFACE=ZIF_ABAPGIT_AJSON_MAPPING"}).set(INPUT.ii_mapper); } ri_json.set((await this.create_from({ii_source_json: this.me, ii_mapper: ii_mapper}))); return ri_json; } async zif_abapgit_ajson$members(INPUT) { let rt_members = abap.types.TableFactory.construct(new abap.types.String({qualifiedName: "STRING"}), {"withHeader":false,"keyType":"DEFAULT","primaryKey":{"isUnique":false,"type":"STANDARD","keyFields":[],"name":"primary_key"},"secondary":[]}, "STRING_TABLE"); let iv_path = INPUT?.iv_path; if (iv_path?.getQualifiedName === undefined || iv_path.getQualifiedName() !== "STRING") { iv_path = undefined; } if (iv_path === undefined) { iv_path = new abap.types.String({qualifiedName: "STRING"}).set(INPUT.iv_path); } let lv_normalized_path = new abap.types.String({qualifiedName: "STRING"}); let fs_item_ = new abap.types.FieldSymbol(new abap.types.Structure({ "path": new abap.types.String({qualifiedName: "ZIF_ABAPGIT_AJSON_TYPES=>TY_NODE-PATH"}), "name": new abap.types.String({qualifiedName: "ZIF_ABAPGIT_AJSON_TYPES=>TY_NODE-NAME"}), "type": new abap.types.String({qualifiedName: "ZIF_ABAPGIT_AJSON_TYPES=>TY_NODE_TYPE"}), "value": new abap.types.String({qualifiedName: "ZIF_ABAPGIT_AJSON_TYPES=>TY_NODE-VALUE"}), "index": new abap.types.Integer({qualifiedName: "ZIF_ABAPGIT_AJSON_TYPES=>TY_NODE-INDEX"}), "order": new abap.types.Integer({qualifiedName: "ZIF_ABAPGIT_AJSON_TYPES=>TY_NODE-ORDER"}), "children": new abap.types.Integer({qualifiedName: "ZIF_ABAPGIT_AJSON_TYPES=>TY_NODE-CHILDREN"})}, "zif_abapgit_ajson_types=>ty_node", undefined, {}, {})); lv_normalized_path.set((await abap.Classes['CLAS-ZCL_ABAPGIT_AJSON-LCL_UTILS'].normalize_path({iv_path: iv_path}))); for await (const unique278 of abap.statements.loop(this.mt_json_tree,{where: async (I) => {return abap.compare.eq(I.path, lv_normalized_path);},topEquals: {"path": lv_normalized_path}})) { fs_item_.assign(unique278); abap.statements.append({source: fs_item_.get().name, target: rt_members}); } return rt_members; } async zif_abapgit_ajson$opts() { let rs_opts = new abap.types.Structure({ "read_only": new abap.types.Character(1, {"qualifiedName":"ABAP_BOOL","ddicName":"ABAP_BOOL"}), "keep_item_order": new abap.types.Character(1, {"qualifiedName":"ABAP_BOOL","ddicName":"ABAP_BOOL"}), "format_datetime": new abap.types.Character(1, {"qualifiedName":"ABAP_BOOL","ddicName":"ABAP_BOOL"}), "to_abap_corresponding_only": new abap.types.Character(1, {"qualifiedName":"ABAP_BOOL","ddicName":"ABAP_BOOL"})}, "zif_abapgit_ajson=>ty_opts", undefined, {}, {}); rs_opts.set(this.#ms_opts); return rs_opts; } async zif_abapgit_ajson$push(INPUT) { let ri_json = new abap.types.ABAPObject({qualifiedName: "ZIF_ABAPGIT_AJSON", RTTIName: "\\INTERFACE=ZIF_ABAPGIT_AJSON"}); let iv_path = INPUT?.iv_path; if (iv_path?.getQualifiedName === undefined || iv_path.getQualifiedName() !== "STRING") { iv_path = undefined; } if (iv_path === undefined) { iv_path = new abap.types.String({qualifiedName: "STRING"}).set(INPUT.iv_path); } let iv_val = INPUT?.iv_val; let lr_parent = new abap.types.DataReference(new abap.types.Structure({ "path": new abap.types.String({qualifiedName: "ZIF_ABAPGIT_AJSON_TYPES=>TY_NODE-PATH"}), "name": new abap.types.String({qualifiedName: "ZIF_ABAPGIT_AJSON_TYPES=>TY_NODE-NAME"}), "type": new abap.types.String({qualifiedName: "ZIF_ABAPGIT_AJSON_TYPES=>TY_NODE_TYPE"}), "value": new abap.types.String({qualifiedName: "ZIF_ABAPGIT_AJSON_TYPES=>TY_NODE-VALUE"}), "index": new abap.types.Integer({qualifiedName: "ZIF_ABAPGIT_AJSON_TYPES=>TY_NODE-INDEX"}), "order": new abap.types.Integer({qualifiedName: "ZIF_ABAPGIT_AJSON_TYPES=>TY_NODE-ORDER"}), "children": new abap.types.Integer({qualifiedName: "ZIF_ABAPGIT_AJSON_TYPES=>TY_NODE-CHILDREN"})}, "zif_abapgit_ajson_types=>ty_node", undefined, {}, {})); let lr_new_node = new abap.types.DataReference(new abap.types.Structure({ "path": new abap.types.String({qualifiedName: "ZIF_ABAPGIT_AJSON_TYPES=>TY_NODE-PATH"}), "name": new abap.types.String({qualifiedName: "ZIF_ABAPGIT_AJSON_TYPES=>TY_NODE-NAME"}), "type": new abap.types.String({qualifiedName: "ZIF_ABAPGIT_AJSON_TYPES=>TY_NODE_TYPE"}), "value": new abap.types.String({qualifiedName: "ZIF_ABAPGIT_AJSON_TYPES=>TY_NODE-VALUE"}), "index": new abap.types.Integer({qualifiedName: "ZIF_ABAPGIT_AJSON_TYPES=>TY_NODE-INDEX"}), "order": new abap.types.Integer({qualifiedName: "ZIF_ABAPGIT_AJSON_TYPES=>TY_NODE-ORDER"}), "children": new abap.types.Integer({qualifiedName: "ZIF_ABAPGIT_AJSON_TYPES=>TY_NODE-CHILDREN"})}, "zif_abapgit_ajson_types=>ty_node", undefined, {}, {})); await this.#read_only_watchdog(); lr_parent.set((await this.#get_item({iv_path: iv_path}))); if (abap.compare.initial(lr_parent)) { await abap.Classes['ZCX_ABAPGIT_AJSON_ERROR'].raise({iv_msg: new abap.types.String().set(`Path [${abap.templateFormatting(iv_path)}] does not exist`)}); } if (abap.compare.ne(lr_parent.get().type, abap.Classes['ZIF_ABAPGIT_AJSON_TYPES'].zif_abapgit_ajson_types$node_type.get().array)) { await abap.Classes['ZCX_ABAPGIT_AJSON_ERROR'].raise({iv_msg: new abap.types.String().set(`Path [${abap.templateFormatting(iv_path)}] is not array`)}); } let lt_new_nodes = abap.types.TableFactory.construct(new abap.types.Structure({ "path": new abap.types.String({qualifiedName: "ZIF_ABAPGIT_AJSON_TYPES=>TY_NODE-PATH"}), "name": new abap.types.String({qualifiedName: "ZIF_ABAPGIT_AJSON_TYPES=>TY_NODE-NAME"}), "type": new abap.types.String({qualifiedName: "ZIF_ABAPGIT_AJSON_TYPES=>TY_NODE_TYPE"}), "value": new abap.types.String({qualifiedName: "ZIF_ABAPGIT_AJSON_TYPES=>TY_NODE-VALUE"}), "index": new abap.types.Integer({qualifiedName: "ZIF_ABAPGIT_AJSON_TYPES=>TY_NODE-INDEX"}), "order": new abap.types.Integer({qualifiedName: "ZIF_ABAPGIT_AJSON_TYPES=>TY_NODE-ORDER"}), "children": new abap.types.Integer({qualifiedName: "ZIF_ABAPGIT_AJSON_TYPES=>TY_NODE-CHILDREN"})}, "zif_abapgit_ajson_types=>ty_node", undefined, {}, {}), {"withHeader":false,"keyType":"USER","primaryKey":{"name":"primary_key","type":"STANDARD","isUnique":false,"keyFields":["PATH","NAME"]},"secondary":[]}, "zif_abapgit_ajson_types=>ty_nodes_tt"); let ls_new_path = new abap.types.Structure({ "path": new abap.types.String({qualifiedName: "ZIF_ABAPGIT_AJSON_TYPES=>TY_PATH_NAME-PATH"}), "name": new abap.types.String({qualifiedName: "ZIF_ABAPGIT_AJSON_TYPES=>TY_PATH_NAME-NAME"})}, "zif_abapgit_ajson_types=>ty_path_name", undefined, {}, {}); let lv_new_index = new abap.types.Integer({qualifiedName: "I"}); lv_new_index.set(abap.operators.add(lr_parent.get().children,abap.IntegerFactory.get(1))); ls_new_path.get().path.set((await abap.Classes['CLAS-ZCL_ABAPGIT_AJSON-LCL_UTILS'].normalize_path({iv_path: iv_path}))); ls_new_path.get().name.set(new abap.types.String().set(`${abap.templateFormatting(lv_new_index)}`)); lt_new_nodes.set((await abap.Classes['CLAS-ZCL_ABAPGIT_AJSON-LCL_ABAP_TO_JSON'].convert({is_opts: this.#ms_opts, iv_data: iv_val, is_prefix: ls_new_path}))); abap.statements.readTable(lt_new_nodes,{index: abap.IntegerFactory.get(1), referenceInto: lr_new_node}); abap.statements.assert(abap.compare.eq(abap.builtin.sy.get().subrc, abap.IntegerFactory.get(0))); lr_new_node.get().index.set(lv_new_index); lr_parent.get().children.set(lv_new_index); abap.statements.insertInternal({lines: true, data: lt_new_nodes, table: this.mt_json_tree}); ri_json.set(this.me); return ri_json; } async zif_abapgit_ajson$set(INPUT) { let ri_json = new abap.types.ABAPObject({qualifiedName: "ZIF_ABAPGIT_AJSON", RTTIName: "\\INTERFACE=ZIF_ABAPGIT_AJSON"}); let iv_path = INPUT?.iv_path; if (iv_path?.getQualifiedName === undefined || iv_path.getQualifiedName() !== "STRING") { iv_path = undefined; } if (iv_path === undefined) { iv_path = new abap.types.String({qualifiedName: "STRING"}).set(INPUT.iv_path); } let iv_val = INPUT?.iv_val; let iv_ignore_empty = new abap.types.Character(1, {"qualifiedName":"ABAP_BOOL","ddicName":"ABAP_BOOL"}); if (INPUT && INPUT.iv_ignore_empty) {iv_ignore_empty.set(INPUT.iv_ignore_empty);} if (INPUT === undefined || INPUT.iv_ignore_empty === undefined) {iv_ignore_empty = abap.builtin.abap_true;} let iv_node_type = new abap.types.String({qualifiedName: "ZIF_ABAPGIT_AJSON_TYPES=>TY_NODE_TYPE"}); if (INPUT && INPUT.iv_node_type) {iv_node_type.set(INPUT.iv_node_type);} let ls_split_path = new abap.types.Structure({ "path": new abap.types.String({qualifiedName: "ZIF_ABAPGIT_AJSON_TYPES=>TY_PATH_NAME-PATH"}), "name": new abap.types.String({qualifiedName: "ZIF_ABAPGIT_AJSON_TYPES=>TY_PATH_NAME-NAME"})}, "zif_abapgit_ajson_types=>ty_path_name", undefined, {}, {}); let lr_parent = new abap.types.DataReference(new abap.types.Structure({ "path": new abap.types.String({qualifiedName: "ZIF_ABAPGIT_AJSON_TYPES=>TY_NODE-PATH"}), "name": new abap.types.String({qualifiedName: "ZIF_ABAPGIT_AJSON_TYPES=>TY_NODE-NAME"}), "type": new abap.types.String({qualifiedName: "ZIF_ABAPGIT_AJSON_TYPES=>TY_NODE_TYPE"}), "value": new abap.types.String({qualifiedName: "ZIF_ABAPGIT_AJSON_TYPES=>TY_NODE-VALUE"}), "index": new abap.types.Integer({qualifiedName: "ZIF_ABAPGIT_AJSON_TYPES=>TY_NODE-INDEX"}), "order": new abap.types.Integer({qualifiedName: "ZIF_ABAPGIT_AJSON_TYPES=>TY_NODE-ORDER"}), "children": new abap.types.Integer({qualifiedName: "ZIF_ABAPGIT_AJSON_TYPES=>TY_NODE-CHILDREN"})}, "zif_abapgit_ajson_types=>ty_node", undefined, {}, {})); let ls_deleted_node = new abap.types.Structure({ "path": new abap.types.String({qualifiedName: "ZIF_ABAPGIT_AJSON_TYPES=>TY_NODE-PATH"}), "name": new abap.types.String({qualifiedName: "ZIF_ABAPGIT_AJSON_TYPES=>TY_NODE-NAME"}), "type": new abap.types.String({qualifiedName: "ZIF_ABAPGIT_AJSON_TYPES=>TY_NODE_TYPE"}), "value": new abap.types.String({qualifiedName: "ZIF_ABAPGIT_AJSON_TYPES=>TY_NODE-VALUE"}), "index": new abap.types.Integer({qualifiedName: "ZIF_ABAPGIT_AJSON_TYPES=>TY_NODE-INDEX"}), "order": new abap.types.Integer({qualifiedName: "ZIF_ABAPGIT_AJSON_TYPES=>TY_NODE-ORDER"}), "children": new abap.types.Integer({qualifiedName: "ZIF_ABAPGIT_AJSON_TYPES=>TY_NODE-CHILDREN"})}, "zif_abapgit_ajson_types=>ty_node", undefined, {}, {}); let lv_item_order = new abap.types.Integer({qualifiedName: "ZIF_ABAPGIT_AJSON_TYPES=>TY_NODE-ORDER"}); await this.#read_only_watchdog(); ri_json.set(this.me); if (abap.compare.initial(iv_val) && abap.compare.eq(iv_ignore_empty, abap.builtin.abap_true) && abap.compare.initial(iv_node_type)) { return ri_json; } if (abap.compare.initial(iv_node_type) === false && abap.compare.ne(iv_node_type, abap.Classes['ZIF_ABAPGIT_AJSON_TYPES'].zif_abapgit_ajson_types$node_type.get().boolean) && abap.compare.ne(iv_node_type, abap.Classes['ZIF_ABAPGIT_AJSON_TYPES'].zif_abapgit_ajson_types$node_type.get().null) && abap.compare.ne(iv_node_type, abap.Classes['ZIF_ABAPGIT_AJSON_TYPES'].zif_abapgit_ajson_types$node_type.get().number) && abap.compare.ne(iv_node_type, abap.Classes['ZIF_ABAPGIT_AJSON_TYPES'].zif_abapgit_ajson_types$node_type.get().string)) { await abap.Classes['ZCX_ABAPGIT_AJSON_ERROR'].raise({iv_msg: new abap.types.String().set(`Unexpected type ${abap.templateFormatting(iv_node_type)}`)}); } ls_split_path.set((await abap.Classes['CLAS-ZCL_ABAPGIT_AJSON-LCL_UTILS'].split_path({iv_path: iv_path}))); if (abap.compare.initial(ls_split_path)) { if (abap.compare.initial(iv_node_type) === false) { this.mt_json_tree.set((await abap.Classes['CLAS-ZCL_ABAPGIT_AJSON-LCL_ABAP_TO_JSON'].insert_with_type({is_opts: this.#ms_opts, iv_data: iv_val, iv_type: iv_node_type, is_prefix: ls_split_path, ii_custom_mapping: this.#mi_custom_mapping}))); } else { this.mt_json_tree.set((await abap.Classes['CLAS-ZCL_ABAPGIT_AJSON-LCL_ABAP_TO_JSON'].convert({is_opts: this.#ms_opts, iv_data: iv_val, is_prefix: ls_split_path, ii_custom_mapping: this.#mi_custom_mapping}))); } return ri_json; } lr_parent.set((await this.#prove_path_exists({iv_path: ls_split_path.get().path}))); abap.statements.assert(abap.compare.initial(lr_parent) === false); ls_deleted_node.set((await this.#delete_subtree({ir_parent: lr_parent, iv_path: ls_split_path.get().path, iv_name: ls_split_path.get().name}))); lv_item_order.set(ls_deleted_node.get().order); let lt_new_nodes = abap.types.TableFactory.construct(new abap.types.Structure({ "path": new abap.types.String({qualifiedName: "ZIF_ABAPGIT_AJSON_TYPES=>TY_NODE-PATH"}), "name": new abap.types.String({qualifiedName: "ZIF_ABAPGIT_AJSON_TYPES=>TY_NODE-NAME"}), "type": new abap.types.String({qualifiedName: "ZIF_ABAPGIT_AJSON_TYPES=>TY_NODE_TYPE"}), "value": new abap.types.String({qualifiedName: "ZIF_ABAPGIT_AJSON_TYPES=>TY_NODE-VALUE"}), "index": new abap.types.Integer({qualifiedName: "ZIF_ABAPGIT_AJSON_TYPES=>TY_NODE-INDEX"}), "order": new abap.types.Integer({qualifiedName: "ZIF_ABAPGIT_AJSON_TYPES=>TY_NODE-ORDER"}), "children": new abap.types.Integer({qualifiedName: "ZIF_ABAPGIT_AJSON_TYPES=>TY_NODE-CHILDREN"})}, "zif_abapgit_ajson_types=>ty_node", undefined, {}, {}), {"withHeader":false,"keyType":"USER","primaryKey":{"name":"primary_key","type":"STANDARD","isUnique":false,"keyFields":["PATH","NAME"]},"secondary":[]}, "zif_abapgit_ajson_types=>ty_nodes_tt"); let lv_array_index = new abap.types.Integer({qualifiedName: "I"}); if (abap.compare.eq(lr_parent.get().type, abap.Classes['ZIF_ABAPGIT_AJSON_TYPES'].zif_abapgit_ajson_types$node_type.get().array)) { lv_array_index.set((await abap.Classes['CLAS-ZCL_ABAPGIT_AJSON-LCL_UTILS'].validate_array_index({iv_path: ls_split_path.get().path, iv_index: ls_split_path.get().name}))); } else if (abap.compare.eq(lr_parent.get().type, abap.Classes['ZIF_ABAPGIT_AJSON_TYPES'].zif_abapgit_ajson_types$node_type.get().object) && abap.compare.eq(lv_item_order, abap.IntegerFactory.get(0)) && abap.compare.eq(this.#ms_opts.get().keep_item_order, abap.builtin.abap_true)) { lv_item_order.set(abap.operators.add(lr_parent.get().children,abap.IntegerFactory.get(1))); } if (abap.compare.initial(iv_node_type) === false) { lt_new_nodes.set((await abap.Classes['CLAS-ZCL_ABAPGIT_AJSON-LCL_ABAP_TO_JSON'].insert_with_type({is_opts: this.#ms_opts, iv_item_order: lv_item_order, iv_data: iv_val, iv_type: iv_node_type, iv_array_index: lv_array_index, is_prefix: ls_split_path, ii_custom_mapping: this.#mi_custom_mapping}))); } else { lt_new_nodes.set((await abap.Classes['CLAS-ZCL_ABAPGIT_AJSON-LCL_ABAP_TO_JSON'].convert({is_opts: this.#ms_opts, iv_item_order: lv_item_order, iv_data: iv_val, iv_array_index: lv_array_index, is_prefix: ls_split_path, ii_custom_mapping: this.#mi_custom_mapping}))); } if (abap.compare.gt(abap.builtin.lines({val: lt_new_nodes}), abap.IntegerFactory.get(0))) { lr_parent.get().children.set(abap.operators.add(lr_parent.get().children,abap.IntegerFactory.get(1))); abap.statements.insertInternal({lines: true, data: lt_new_nodes, table: this.mt_json_tree}); } return ri_json; } async zif_abapgit_ajson$setx(INPUT) { let ri_json = new abap.types.ABAPObject({qualifiedName: "ZIF_ABAPGIT_AJSON", RTTIName: "\\INTERFACE=ZIF_ABAPGIT_AJSON"}); let iv_param = INPUT?.iv_param; if (iv_param?.getQualifiedName === undefined || iv_param.getQualifiedName() !== "STRING") { iv_param = undefined; } if (iv_param === undefined) { iv_param = new abap.types.String({qualifiedName: "STRING"}).set(INPUT.iv_param); } let lv_path = new abap.types.String({qualifiedName: "STRING"}); let lv_val = new abap.types.String({qualifiedName: "STRING"}); let lv_int = new abap.types.Integer({qualifiedName: "I"}); let lv_dec = new abap.types.DecFloat34(); let lv_last = new abap.types.Integer({qualifiedName: "I"}); if (abap.compare.initial(iv_param)) { ri_json.set(this.me); return ri_json; } abap.statements.split({source: iv_param, at: abap.CharacterFactory.get(1, ':'), targets: [lv_path,lv_val]}); abap.statements.condense(lv_path, {nogaps: false}); abap.statements.condense(lv_val, {nogaps: false}); if (abap.compare.initial(lv_val)) { ri_json.set(this.me); return ri_json; } if (abap.compare.initial(zcl_abapgit_ajson.go_float_regex)) { zcl_abapgit_ajson.go_float_regex.set(await (new abap.Classes['CL_ABAP_REGEX']()).constructor_({pattern: abap.CharacterFactory.get(25, '^([1-9][0-9]*|0)\\.[0-9]+$')})); } if (abap.compare.eq(lv_val, abap.CharacterFactory.get(4, 'null'))) { await this.zif_abapgit_ajson$set_null({iv_path: lv_path}); } else if (abap.compare.eq(lv_val, abap.CharacterFactory.get(4, 'true'))) { await this.zif_abapgit_ajson$set_boolean({iv_path: lv_path, iv_val: abap.builtin.abap_true}); } else if (abap.compare.eq(lv_val, abap.CharacterFactory.get(5, 'false'))) { await this.zif_abapgit_ajson$set_boolean({iv_path: lv_path, iv_val: abap.builtin.abap_false}); } else if (abap.compare.co(lv_val, abap.CharacterFactory.get(10, '0123456789'))) { lv_int.set(lv_val); await this.zif_abapgit_ajson$set_integer({iv_path: lv_path, iv_val: lv_int}); } else if (abap.compare.co(lv_val, abap.CharacterFactory.get(11, '0123456789.')) && abap.compare.eq((await (await zcl_abapgit_ajson.go_float_regex.get().create_matcher({text: lv_val})).get().match()), abap.builtin.abap_true)) { lv_dec.set(lv_val); await this.zif_abapgit_ajson$set({iv_path: lv_path, iv_val: lv_dec}); } else if (abap.compare.eq(lv_val.getOffset({offset: 0, length: 1}), abap.CharacterFactory.get(1, '{')) || abap.compare.eq(lv_val.getOffset({offset: 0, length: 1}), abap.CharacterFactory.get(1, '['))) { await this.zif_abapgit_ajson$set({iv_path: lv_path, iv_val: (await this.parse({iv_json: lv_val, iv_keep_item_order: this.#ms_opts.get().keep_item_order}))}); } else { lv_last.set(abap.operators.minus(abap.builtin.strlen({val: lv_val}),abap.IntegerFactory.get(1))); if (abap.compare.eq(lv_val.getOffset({offset: 0, length: 1}), abap.CharacterFactory.get(1, '"')) && abap.compare.eq(lv_val.getOffset({offset: lv_last, length: 1}), abap.CharacterFactory.get(1, '"'))) { lv_val.set(abap.builtin.substring({val: lv_val, off: abap.IntegerFactory.get(1), len: abap.operators.minus(lv_last,abap.IntegerFactory.get(1))})); } await this.zif_abapgit_ajson$set_string({iv_path: lv_path, iv_val: lv_val}); } ri_json.set(this.me); return ri_json; } async zif_abapgit_ajson$set_boolean(INPUT) { let ri_json = new abap.types.ABAPObject({qualifiedName: "ZIF_ABAPGIT_AJSON", RTTIName: "\\INTERFACE=ZIF_ABAPGIT_AJSON"}); let iv_path = INPUT?.iv_path; if (iv_path?.getQualifiedName === undefined || iv_path.getQualifiedName() !== "STRING") { iv_path = undefined; } if (iv_path === undefined) { iv_path = new abap.types.String({qualifiedName: "STRING"}).set(INPUT.iv_path); } let iv_val = INPUT?.iv_val; ri_json.set(this.me); let lv_bool = new abap.types.Character(1, {"qualifiedName":"ABAP_BOOL","ddicName":"ABAP_BOOL"}); lv_bool.set(abap.builtin.boolc(abap.compare.initial(iv_val) === false)); await this.zif_abapgit_ajson$set({iv_ignore_empty: abap.builtin.abap_false, iv_path: iv_path, iv_val: lv_bool}); return ri_json; } async zif_abapgit_ajson$set_date(INPUT) { let ri_json = new abap.types.ABAPObject({qualifiedName: "ZIF_ABAPGIT_AJSON", RTTIName: "\\INTERFACE=ZIF_ABAPGIT_AJSON"}); let iv_path = INPUT?.iv_path; if (iv_path?.getQualifiedName === undefined || iv_path.getQualifiedName() !== "STRING") { iv_path = undefined; } if (iv_path === undefined) { iv_path = new abap.types.String({qualifiedName: "STRING"}).set(INPUT.iv_path); } let iv_val = INPUT?.iv_val; if (iv_val?.getQualifiedName === undefined || iv_val.getQualifiedName() !== "D") { iv_val = undefined; } if (iv_val === undefined) { iv_val = new abap.types.Date({qualifiedName: "D"}).set(INPUT.iv_val); } ri_json.set(this.me); let lv_val = new abap.types.String({qualifiedName: "STRING"}); lv_val.set((await abap.Classes['CLAS-ZCL_ABAPGIT_AJSON-LCL_ABAP_TO_JSON'].format_date({iv_date: iv_val}))); await this.zif_abapgit_ajson$set({iv_ignore_empty: abap.builtin.abap_false, iv_path: iv_path, iv_val: lv_val}); return ri_json; } async zif_abapgit_ajson$set_integer(INPUT) { let ri_json = new abap.types.ABAPObject({qualifiedName: "ZIF_ABAPGIT_AJSON", RTTIName: "\\INTERFACE=ZIF_ABAPGIT_AJSON"}); let iv_path = INPUT?.iv_path; if (iv_path?.getQualifiedName === undefined || iv_path.getQualifiedName() !== "STRING") { iv_path = undefined; } if (iv_path === undefined) { iv_path = new abap.types.String({qualifiedName: "STRING"}).set(INPUT.iv_path); } let iv_val = INPUT?.iv_val; if (iv_val?.getQualifiedName === undefined || iv_val.getQualifiedName() !== "I") { iv_val = undefined; } if (iv_val === undefined) { iv_val = new abap.types.Integer({qualifiedName: "I"}).set(INPUT.iv_val); } ri_json.set(this.me); await this.zif_abapgit_ajson$set({iv_ignore_empty: abap.builtin.abap_false, iv_path: iv_path, iv_val: iv_val}); return ri_json; } async zif_abapgit_ajson$set_null(INPUT) { let ri_json = new abap.types.ABAPObject({qualifiedName: "ZIF_ABAPGIT_AJSON", RTTIName: "\\INTERFACE=ZIF_ABAPGIT_AJSON"}); let iv_path = INPUT?.iv_path; if (iv_path?.getQualifiedName === undefined || iv_path.getQualifiedName() !== "STRING") { iv_path = undefined; } if (iv_path === undefined) { iv_path = new abap.types.String({qualifiedName: "STRING"}).set(INPUT.iv_path); } ri_json.set(this.me); let lv_null_ref = new abap.types.DataReference(new abap.types.Character(4)); await this.zif_abapgit_ajson$set({iv_ignore_empty: abap.builtin.abap_false, iv_path: iv_path, iv_val: lv_null_ref}); return ri_json; } async zif_abapgit_ajson$set_string(INPUT) { let ri_json = new abap.types.ABAPObject({qualifiedName: "ZIF_ABAPGIT_AJSON", RTTIName: "\\INTERFACE=ZIF_ABAPGIT_AJSON"}); let iv_path = INPUT?.iv_path; if (iv_path?.getQualifiedName === undefined || iv_path.getQualifiedName() !== "STRING") { iv_path = undefined; } if (iv_path === undefined) { iv_path = new abap.types.String({qualifiedName: "STRING"}).set(INPUT.iv_path); } let iv_val = INPUT?.iv_val; ri_json.set(this.me); let lv_val = new abap.types.String({qualifiedName: "STRING"}); lv_val.set(iv_val); await this.zif_abapgit_ajson$set({iv_ignore_empty: abap.builtin.abap_false, iv_path: iv_path, iv_val: lv_val}); return ri_json; } async zif_abapgit_ajson$set_timestamp(INPUT) { let ri_json = new abap.types.ABAPObject({qualifiedName: "ZIF_ABAPGIT_AJSON", RTTIName: "\\INTERFACE=ZIF_ABAPGIT_AJSON"}); let iv_path = INPUT?.iv_path; if (iv_path?.getQualifiedName === undefined || iv_path.getQualifiedName() !== "STRING") { iv_path = undefined; } if (iv_path === undefined) { iv_path = new abap.types.String({qualifiedName: "STRING"}).set(INPUT.iv_path); } let iv_val = INPUT?.iv_val; if (iv_val?.getQualifiedName === undefined || iv_val.getQualifiedName() !== "TIMESTAMP") { iv_val = undefined; } if (iv_val === undefined) { iv_val = new abap.types.Packed({length: 15, decimals: 0, qualifiedName: "TIMESTAMP"}).set(INPUT.iv_val); } ri_json.set(this.me); let lv_timestamp_iso = new abap.types.String({qualifiedName: "STRING"}); lv_timestamp_iso.set((await abap.Classes['CLAS-ZCL_ABAPGIT_AJSON-LCL_ABAP_TO_JSON'].format_timestamp({iv_ts: iv_val}))); await this.zif_abapgit_ajson$set({iv_ignore_empty: abap.builtin.abap_false, iv_path: iv_path, iv_val: lv_timestamp_iso}); return ri_json; } async zif_abapgit_ajson$set_timestampl(INPUT) { let ri_json = new abap.types.ABAPObject({qualifiedName: "ZIF_ABAPGIT_AJSON", RTTIName: "\\INTERFACE=ZIF_ABAPGIT_AJSON"}); let iv_path = INPUT?.iv_path; if (iv_path?.getQualifiedName === undefined || iv_path.getQualifiedName() !== "STRING") { iv_path = undefined; } if (iv_path === undefined) { iv_path = new abap.types.String({qualifiedName: "STRING"}).set(INPUT.iv_path); } let iv_val = INPUT?.iv_val; if (iv_val?.getQualifiedName === undefined || iv_val.getQualifiedName() !== "TIMESTAMPL") { iv_val = undefined; } if (iv_val === undefined) { iv_val = new abap.types.Packed({length: 21, decimals: 7, qualifiedName: "TIMESTAMPL"}).set(INPUT.iv_val); } ri_json.set(this.me); let lv_timestamp_iso = new abap.types.String({qualifiedName: "STRING"}); lv_timestamp_iso.set((await abap.Classes['CLAS-ZCL_ABAPGIT_AJSON-LCL_ABAP_TO_JSON'].format_timestampl({iv_ts: iv_val}))); await this.zif_abapgit_ajson$set({iv_ignore_empty: abap.builtin.abap_false, iv_path: iv_path, iv_val: lv_timestamp_iso}); return ri_json; } async zif_abapgit_ajson$slice(INPUT) { let ri_json = new abap.types.ABAPObject({qualifiedName: "ZIF_ABAPGIT_AJSON", RTTIName: "\\INTERFACE=ZIF_ABAPGIT_AJSON"}); let iv_path = INPUT?.iv_path; if (iv_path?.getQualifiedName === undefined || iv_path.getQualifiedName() !== "STRING") { iv_path = undefined; } if (iv_path === undefined) { iv_path = new abap.types.String({qualifiedName: "STRING"}).set(INPUT.iv_path); } let lo_section = new abap.types.ABAPObject({qualifiedName: "ZCL_ABAPGIT_AJSON", RTTIName: "\\CLASS=ZCL_ABAPGIT_AJSON"}); let ls_item = new abap.types.Structure({ "path": new abap.types.String({qualifiedName: "ZIF_ABAPGIT_AJSON_TYPES=>TY_NODE-PATH"}), "name": new abap.types.String({qualifiedName: "ZIF_ABAPGIT_AJSON_TYPES=>TY_NODE-NAME"}), "type": new abap.types.String({qualifiedName: "ZIF_ABAPGIT_AJSON_TYPES=>TY_NODE_TYPE"}), "value": new abap.types.String({qualifiedName: "ZIF_ABAPGIT_AJSON_TYPES=>TY_NODE-VALUE"}), "index": new abap.types.Integer({qualifiedName: "ZIF_ABAPGIT_AJSON_TYPES=>TY_NODE-INDEX"}), "order": new abap.types.Integer({qualifiedName: "ZIF_ABAPGIT_AJSON_TYPES=>TY_NODE-ORDER"}), "children": new abap.types.Integer({qualifiedName: "ZIF_ABAPGIT_AJSON_TYPES=>TY_NODE-CHILDREN"})}, "zif_abapgit_ajson_types=>ty_node", undefined, {}, {}); let lv_normalized_path = new abap.types.String({qualifiedName: "STRING"}); let ls_path_parts = new abap.types.Structure({ "path": new abap.types.String({qualifiedName: "ZIF_ABAPGIT_AJSON_TYPES=>TY_PATH_NAME-PATH"}), "name": new abap.types.String({qualifiedName: "ZIF_ABAPGIT_AJSON_TYPES=>TY_PATH_NAME-NAME"})}, "zif_abapgit_ajson_types=>ty_path_name", undefined, {}, {}); let lv_path_len = new abap.types.Integer({qualifiedName: "I"}); let lv_path_pattern = new abap.types.String({qualifiedName: "STRING"}); lo_section.set(await (new abap.Classes['ZCL_ABAPGIT_AJSON']()).constructor_()); lo_section.get().#mi_custom_mapping.set(this.#mi_custom_mapping); lv_normalized_path.set((await abap.Classes['CLAS-ZCL_ABAPGIT_AJSON-LCL_UTILS'].normalize_path({iv_path: iv_path}))); lv_path_len.set(abap.builtin.strlen({val: lv_normalized_path})); ls_path_parts.set((await abap.Classes['CLAS-ZCL_ABAPGIT_AJSON-LCL_UTILS'].split_path({iv_path: lv_normalized_path}))); abap.statements.readTable(this.mt_json_tree,{into: ls_item, withKey: (i) => {return abap.compare.eq(i.path, ls_path_parts.get().path) && abap.compare.eq(i.name, ls_path_parts.get().name);}, withKeyValue: [{key: (i) => {return i.path}, value: ls_path_parts.get().path},{key: (i) => {return i.name}, value: ls_path_parts.get().name}], usesTableLine: false, withKeySimple: {"path": ls_path_parts.get().path,"name": ls_path_parts.get().name}}); if (abap.compare.ne(abap.builtin.sy.get().subrc, abap.IntegerFactory.get(0))) { return ri_json; } ls_item.get().path.clear(); ls_item.get().name.clear(); ls_item.get().order.clear(); abap.statements.insertInternal({data: ls_item, table: lo_section.get().zif_abapgit_ajson$mt_json_tree}); lv_path_pattern.set(abap.operators.concat(lv_normalized_path,new abap.types.String().set(`*`))); for await (const unique279 of abap.statements.loop(this.mt_json_tree,{where: async (I) => {return abap.compare.cp(I.path, lv_path_pattern);}})) { ls_item.set(unique279); ls_item.get().path.set(abap.builtin.substring({val: ls_item.get().path, off: abap.operators.minus(lv_path_len,abap.IntegerFactory.get(1))})); abap.statements.insertInternal({data: ls_item, table: lo_section.get().zif_abapgit_ajson$mt_json_tree}); } ri_json.set(lo_section); return ri_json; } async zif_abapgit_ajson$stringify(INPUT) { let rv_json = new abap.types.String({qualifiedName: "STRING"}); let iv_indent = new abap.types.Integer({qualifiedName: "I"}); if (INPUT && INPUT.iv_indent) {iv_indent.set(INPUT.iv_indent);} if (INPUT === undefined || INPUT.iv_indent === undefined) {iv_indent = abap.IntegerFactory.get(0);} rv_json.set((await abap.Classes['CLAS-ZCL_ABAPGIT_AJSON-LCL_JSON_SERIALIZER'].stringify({it_json_tree: this.mt_json_tree, iv_keep_item_order: this.#ms_opts.get().keep_item_order, iv_indent: iv_indent}))); return rv_json; } async zif_abapgit_ajson$touch_array(INPUT) { let ri_json = new abap.types.ABAPObject({qualifiedName: "ZIF_ABAPGIT_AJSON", RTTIName: "\\INTERFACE=ZIF_ABAPGIT_AJSON"}); let iv_path = INPUT?.iv_path; if (iv_path?.getQualifiedName === undefined || iv_path.getQualifiedName() !== "STRING") { iv_path = undefined; } if (iv_path === undefined) { iv_path = new abap.types.String({qualifiedName: "STRING"}).set(INPUT.iv_path); } let iv_clear = new abap.types.Character(1, {"qualifiedName":"ABAP_BOOL","ddicName":"ABAP_BOOL"}); if (INPUT && INPUT.iv_clear) {iv_clear.set(INPUT.iv_clear);} if (INPUT === undefined || INPUT.iv_clear === undefined) {iv_clear = abap.builtin.abap_false;} let lr_node = new abap.types.DataReference(new abap.types.Structure({ "path": new abap.types.String({qualifiedName: "ZIF_ABAPGIT_AJSON_TYPES=>TY_NODE-PATH"}), "name": new abap.types.String({qualifiedName: "ZIF_ABAPGIT_AJSON_TYPES=>TY_NODE-NAME"}), "type": new abap.types.String({qualifiedName: "ZIF_ABAPGIT_AJSON_TYPES=>TY_NODE_TYPE"}), "value": new abap.types.String({qualifiedName: "ZIF_ABAPGIT_AJSON_TYPES=>TY_NODE-VALUE"}), "index": new abap.types.Integer({qualifiedName: "ZIF_ABAPGIT_AJSON_TYPES=>TY_NODE-INDEX"}), "order": new abap.types.Integer({qualifiedName: "ZIF_ABAPGIT_AJSON_TYPES=>TY_NODE-ORDER"}), "children": new abap.types.Integer({qualifiedName: "ZIF_ABAPGIT_AJSON_TYPES=>TY_NODE-CHILDREN"})}, "zif_abapgit_ajson_types=>ty_node", undefined, {}, {})); let ls_deleted_node = new abap.types.Structure({ "path": new abap.types.String({qualifiedName: "ZIF_ABAPGIT_AJSON_TYPES=>TY_NODE-PATH"}), "name": new abap.types.String({qualifiedName: "ZIF_ABAPGIT_AJSON_TYPES=>TY_NODE-NAME"}), "type": new abap.types.String({qualifiedName: "ZIF_ABAPGIT_AJSON_TYPES=>TY_NODE_TYPE"}), "value": new abap.types.String({qualifiedName: "ZIF_ABAPGIT_AJSON_TYPES=>TY_NODE-VALUE"}), "index": new abap.types.Integer({qualifiedName: "ZIF_ABAPGIT_AJSON_TYPES=>TY_NODE-INDEX"}), "order": new abap.types.Integer({qualifiedName: "ZIF_ABAPGIT_AJSON_TYPES=>TY_NODE-ORDER"}), "children": new abap.types.Integer({qualifiedName: "ZIF_ABAPGIT_AJSON_TYPES=>TY_NODE-CHILDREN"})}, "zif_abapgit_ajson_types=>ty_node", undefined, {}, {}); let ls_new_node = new abap.types.Structure({ "path": new abap.types.String({qualifiedName: "ZIF_ABAPGIT_AJSON_TYPES=>TY_NODE-PATH"}), "name": new abap.types.String({qualifiedName: "ZIF_ABAPGIT_AJSON_TYPES=>TY_NODE-NAME"}), "type": new abap.types.String({qualifiedName: "ZIF_ABAPGIT_AJSON_TYPES=>TY_NODE_TYPE"}), "value": new abap.types.String({qualifiedName: "ZIF_ABAPGIT_AJSON_TYPES=>TY_NODE-VALUE"}), "index": new abap.types.Integer({qualifiedName: "ZIF_ABAPGIT_AJSON_TYPES=>TY_NODE-INDEX"}), "order": new abap.types.Integer({qualifiedName: "ZIF_ABAPGIT_AJSON_TYPES=>TY_NODE-ORDER"}), "children": new abap.types.Integer({qualifiedName: "ZIF_ABAPGIT_AJSON_TYPES=>TY_NODE-CHILDREN"})}, "zif_abapgit_ajson_types=>ty_node", undefined, {}, {}); let ls_split_path = new abap.types.Structure({ "path": new abap.types.String({qualifiedName: "ZIF_ABAPGIT_AJSON_TYPES=>TY_PATH_NAME-PATH"}), "name": new abap.types.String({qualifiedName: "ZIF_ABAPGIT_AJSON_TYPES=>TY_PATH_NAME-NAME"})}, "zif_abapgit_ajson_types=>ty_path_name", undefined, {}, {}); await this.#read_only_watchdog(); ls_split_path.set((await abap.Classes['CLAS-ZCL_ABAPGIT_AJSON-LCL_UTILS'].split_path({iv_path: iv_path}))); if (abap.compare.initial(ls_split_path)) { ls_new_node.get().path.set(ls_split_path.get().path); ls_new_node.get().name.set(ls_split_path.get().name); ls_new_node.get().type.set(abap.Classes['ZIF_ABAPGIT_AJSON_TYPES'].zif_abapgit_ajson_types$node_type.get().array); abap.statements.insertInternal({data: ls_new_node, table: this.mt_json_tree}); return ri_json; } if (abap.compare.eq(iv_clear, abap.builtin.abap_true)) { ls_deleted_node.set((await this.#delete_subtree({iv_path: ls_split_path.get().path, iv_name: ls_split_path.get().name}))); } else { lr_node.set((await this.#get_item({iv_path: iv_path}))); } if (abap.compare.initial(lr_node)) { let lr_parent = new abap.types.DataReference(new abap.types.Structure({ "path": new abap.types.String({qualifiedName: "ZIF_ABAPGIT_AJSON_TYPES=>TY_NODE-PATH"}), "name": new abap.types.String({qualifiedName: "ZIF_ABAPGIT_AJSON_TYPES=>TY_NODE-NAME"}), "type": new abap.types.String({qualifiedName: "ZIF_ABAPGIT_AJSON_TYPES=>TY_NODE_TYPE"}), "value": new abap.types.String({qualifiedName: "ZIF_ABAPGIT_AJSON_TYPES=>TY_NODE-VALUE"}), "index": new abap.types.Integer({qualifiedName: "ZIF_ABAPGIT_AJSON_TYPES=>TY_NODE-INDEX"}), "order": new abap.types.Integer({qualifiedName: "ZIF_ABAPGIT_AJSON_TYPES=>TY_NODE-ORDER"}), "children": new abap.types.Integer({qualifiedName: "ZIF_ABAPGIT_AJSON_TYPES=>TY_NODE-CHILDREN"})}, "zif_abapgit_ajson_types=>ty_node", undefined, {}, {})); lr_parent.set((await this.#prove_path_exists({iv_path: ls_split_path.get().path}))); abap.statements.assert(abap.compare.initial(lr_parent) === false); lr_parent.get().children.set(abap.operators.add(lr_parent.get().children,abap.IntegerFactory.get(1))); ls_new_node.get().path.set(ls_split_path.get().path); ls_new_node.get().name.set(ls_split_path.get().name); ls_new_node.get().type.set(abap.Classes['ZIF_ABAPGIT_AJSON_TYPES'].zif_abapgit_ajson_types$node_type.get().array); if (abap.compare.eq(this.#ms_opts.get().keep_item_order, abap.builtin.abap_true)) { if (abap.compare.initial(ls_deleted_node) === false) { ls_new_node.get().order.set(ls_deleted_node.get().order); } else { ls_new_node.get().order.set(lr_parent.get().children); } } abap.statements.insertInternal({data: ls_new_node, table: this.mt_json_tree}); } else if (abap.compare.ne(lr_node.get().type, abap.Classes['ZIF_ABAPGIT_AJSON_TYPES'].zif_abapgit_ajson_types$node_type.get().array)) { await abap.Classes['ZCX_ABAPGIT_AJSON_ERROR'].raise({iv_msg: new abap.types.String().set(`Path [${abap.templateFormatting(iv_path)}] already used and is not array`)}); } ri_json.set(this.me); return ri_json; } async zif_abapgit_ajson$to_abap(INPUT) { let iv_corresponding = new abap.types.Character(1, {"qualifiedName":"ABAP_BOOL","ddicName":"ABAP_BOOL"}); if (INPUT && INPUT.iv_corresponding) {iv_corresponding.set(INPUT.iv_corresponding);} if (INPUT === undefined || INPUT.iv_corresponding === undefined) {iv_corresponding = abap.builtin.abap_false;} let ii_refs_initiator = new abap.types.ABAPObject({qualifiedName: "ZIF_ABAPGIT_AJSON_REF_INIT", RTTIName: "\\INTERFACE=ZIF_ABAPGIT_AJSON_REF_INIT"}); if (INPUT && INPUT.ii_refs_initiator) {ii_refs_initiator.set(INPUT.ii_refs_initiator);} let ev_container = INPUT?.ev_container || new abap.types.Character(4); let lo_to_abap = new abap.types.ABAPObject({qualifiedName: "LCL_JSON_TO_ABAP", RTTIName: "\\CLASS-POOL=ZCL_ABAPGIT_AJSON\\CLASS=LCL_JSON_TO_ABAP"}); ev_container.clear(); lo_to_abap.set(await (new abap.Classes['CLAS-ZCL_ABAPGIT_AJSON-LCL_JSON_TO_ABAP']()).constructor_({iv_corresponding: abap.builtin.boolc(abap.compare.eq(iv_corresponding, abap.builtin.abap_true) || abap.compare.eq(this.#ms_opts.get().to_abap_corresponding_only, abap.builtin.abap_true)), ii_custom_mapping: this.#mi_custom_mapping, ii_refs_initiator: ii_refs_initiator})); await lo_to_abap.get().to_abap({it_nodes: this.zif_abapgit_ajson$mt_json_tree, c_container: ev_container}); } async zif_abapgit_ajson$to_abap_corresponding_only(INPUT) { let ri_json = new abap.types.ABAPObject({qualifiedName: "ZIF_ABAPGIT_AJSON", RTTIName: "\\INTERFACE=ZIF_ABAPGIT_AJSON"}); let iv_enable = new abap.types.Character(1, {"qualifiedName":"ABAP_BOOL","ddicName":"ABAP_BOOL"}); if (INPUT && INPUT.iv_enable) {iv_enable.set(INPUT.iv_enable);} if (INPUT === undefined || INPUT.iv_enable === undefined) {iv_enable = abap.builtin.abap_true;} this.#ms_opts.get().to_abap_corresponding_only.set(iv_enable); ri_json.set(this.me); return ri_json; } } abap.Classes['ZCL_ABAPGIT_AJSON'] = zcl_abapgit_ajson; zcl_abapgit_ajson.go_float_regex = new abap.types.ABAPObject({qualifiedName: "CL_ABAP_REGEX", RTTIName: "\\CLASS=CL_ABAP_REGEX"}); zcl_abapgit_ajson.zif_abapgit_ajson$version = new abap.types.String({qualifiedName: "STRING"}); zcl_abapgit_ajson.zif_abapgit_ajson$version.set('v1.1.12'); zcl_abapgit_ajson.zif_abapgit_ajson$origin = new abap.types.String({qualifiedName: "STRING"}); zcl_abapgit_ajson.zif_abapgit_ajson$origin.set('https://github.com/sbcgua/ajson'); zcl_abapgit_ajson.zif_abapgit_ajson$license = new abap.types.String({qualifiedName: "STRING"}); zcl_abapgit_ajson.zif_abapgit_ajson$license.set('MIT'); await abap.Classes['CLAS-ZCL_ABAPGIT_AJSON-LCL_JSON_SERIALIZER'].class_constructor(); await abap.Classes['CLAS-ZCL_ABAPGIT_AJSON-LCL_ABAP_TO_JSON'].class_constructor(); export {zcl_abapgit_ajson}; |