Error using plantuml %load_json in DocToolchain

0 votes
asked Feb 29, 2024 in Question / help by javaOldie (120 points)

Hi all,
this is maybe not directly an plantUml Question, but the bug report told me to post that here ;-)
Unfortunately the bug report is an image and here i cannot add attachements.

i also reported the problem here:
https://stackoverflow.com/questions/78082184/using-plantuml-load-json-in-doctoolchain

I try to use the possibility to schon an external json file in a class diagram, embedded in an asciidoc file using doctoolchain.

I'm able to reference the file in asciidoc with include:

----
include::../../plantuml/test.json[]
----

But that is not working:

!$remote_json = %load_json("../../plantuml/test.json")

However, if i use the absolute path, it works:

!$remote_json = %load_json("/home/user/git/project/src/test/resources/SAMPLE_CREATE_1.json")

There is a config param plantuml.include.path, but i've no idea where to set this in doctoolchain. And i think it is somehow already set, becouse all other stuff is working.

I expect, that plantuml is unable to find the referenced file, but in the error message there is no file location, it's an error parsing the result from graphviz.

BugReport Image: https://github.com/naturzukunft/publicSharing/blob/main/plantUMLError.png

commented Feb 29, 2024 by The-Lu (79,040 points)

Hello J.,

1/ You use the version v1.2023.5 of PlantUML:

  • Could you use a more recent version?

2/ The error is due to the internal engine `SmetanaForJson`, and the error here:

3/ Perhaps: Could you post your source file?

If that can help,
Regards,
Th.

commented Mar 1, 2024 by anonymous
i created this issue: https://github.com/docToolchain/docToolchain/issues/1378 regarding the plantUml Version.

Thats a snipped from the asciidoc file:

=== test json import

[plantuml, "{plantUMLDir}testJson", png]
----
@startuml

!$remote_json = %load_json("../../plantuml/test.json")

label l [
{{json
$remote_json
}}
]
@enduml
----

Your answer

Your name to display (optional):
Privacy: Your email address will only be used for sending these notifications.
Anti-spam verification:

[Antispam2 Feature: please please wait 1 or 2 minutes (this message will disappear) before pressing the button otherwise it will fail](--------)
To avoid this verification in future, please log in or register.
...