Has long text support gone from json?

0 votes
asked May 15, 2023 in Question / help by Bryan (340 points)
I am trying to put long text into json boxes, and was hoping it would wrap.

This answer suggests it should: https://forum.plantuml.net/16639/long-text-in-json, but that doesn't work, even in the current server?

Is there a new method?

Thanks in advance, Bryan

1 Answer

0 votes
answered May 16, 2023 by The-Lu (65,440 points)

Hi B., and all,

For that you can see:

And use `json` style, like:

@startuml
<style>
json {
  MaximumWidth 300
}
</style>
json JSON {
  "text": "Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat."
}
@enduml

Enjoy,
Regards,
Th.

commented May 16, 2023 by Bryan (340 points)

Thanks. I misunderstood without this last message!

 Just to note if you are doing nested json, you may need to do 

<style>

jsondiagram {

MaximumWidth 300 

}

</style>

commented May 16, 2023 by The-Lu (65,440 points)

Hi B., and all,

Yes of course, like:

@startjson
<style>
jsondiagram  {
  MaximumWidth 300
}
</style>
{
  "text": "Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat."
}
@endjson

Enjoy,
Regards.

...