How can I add the description/explanation to the Json Diagram?

0 votes
asked Oct 15, 2021 in Question / help by segachan

Hello.

I want to use Json PlantUML as the Web API Document Generator.

How can I add the description/explanation to the Json Diagram?

For example, there is the description for Json parametor at GitHub API Doc.:

https://docs.github.com/en/rest/reference/users#update-the-authenticated-user--parameters

There is the situation adding the description/explanation to Json data. 

Using PlantUML, Json including the description/explanation is converted to Diagram/Table, it is very useful.

Kind regards, Json Visualizer is powerfull and cool, thank you.

1 Answer

0 votes
answered Oct 19, 2021 by Martin (9,120 points)
edited Oct 20, 2021 by Martin

I'm sorry, but I am finding the question difficult to understand.  I think you are asking how you can add additional text to a PlantUML Json diagram.
I was surprised to find that standard title/caption/legend features don't work with @STARTJSON, that might make a good wanted feature.
So my next idea was to nest the JSON diagram inside a deployment diagram using the 'label' shape. 
The online server doesn't like nesting an {{@STARTJSON...}} inside an @STARTUML.  Luckily there is an alternative syntax using {{json...}} as used in this example: https://plantuml.com/preprocessing-json#fe16b3bc321e147d

So here is my idea, click on the diagram for the source.  Sorry if I've misunderstood.

...