plantuml / plantuml

Generate diagrams from textual description
https://plantuml.com
Other
9.66k stars 878 forks source link

feat: add new JSON builtin functions (`%str2json`, `%json_add` and `%json_remove`) #1742

Closed The-Lum closed 2 weeks ago

The-Lum commented 3 weeks ago

Hello PlantUML team, and all,

To answer to:

Here is a (first) PR with the new builtin functions:


[!NOTE] Here is a first question about %json_remove on array:

%json_remove([1,2,3], 0) = [2,3]

But currently:

%json_remove([1,2,3], -1) = [1,2,3]
  • What should we do when the index is negative? (nothing or from the end of the array... like below)
    %json_remove([1,2,3], -1) = [1,2]

Regards, Th.