Add a title to a Json Diagram

0 votes
asked Dec 1, 2021 in Question / help by TERENCIO
Add a title to a Json Diagram ?

Same question for XML Diagram
commented Dec 1, 2021 by Martin (6,780 points)

Similar to https://forum.plantuml.net/14763/how-can-add-the-description-explanation-to-the-json-diagram where i suggested a workaround of embedding the json inside a deployment diagram label.

commented Dec 1, 2021 by TERENCIO
Thank you

@startuml
Title Update the authenticated user
Caption This is a caption
Legend This is a Legend
skinparam wrapWidth 800

label B [
{{json
{
  "login": "octocat",
  "id": 1,
  "node_id": "MDQ6VXNlcjE=",
  "avatar_url": "https://github.com/images/error/octocat_happy.gif",
  "disk_usage": 10000,
  "collaborators": 8,
  "two_factor_authentication": true,
  "plan": {
    "name": "Medium",
    "space": 400,
    "private_repos": 20,
    "collaborators": 0
  }
}
}}
]
@enduml

1 Answer

0 votes
answered Dec 7, 2021 by Martin (6,780 points)

A work-around to JSON diagrams not supporting "title" is to embed the JSON diagram inside a deployment diagram.  The label shape provides a nice container with minimal extra visual baggage.

Lazily copying the OP's example from the above comments:

...