JSON-type component breaks

0 votes
asked Sep 26, 2022 in Bug by boshka (3,960 points)
Hello!

The following examples break, though should not:

1.

@startuml
json someJson [
1, 2, 3
]
@enduml

2.

@startuml
json "some json" {
"a": 1
}
@enduml
commented Sep 26, 2022 by The-Lu (74,900 points)

Hello B., and all,

See similar reported issue here:

For your second cases, could you add an alias, as:

@startuml
json "some json" as J {
"a": 1
}
@enduml

For the first case, @PlantUML team, see also this example:

@startuml
json someJson {
[1, 2, 3]
}
@enduml

If that can help, for debugging...
Regards.
Th.

commented Sep 26, 2022 by boshka (3,960 points)
edited Sep 30, 2022 by boshka
UPDATE: filed a bug on this in: https://forum.plantuml.net/16640/some-arrows-from-json-component-to-another-component-fail

The-Lu, thank you!

This worked. However, run into the following issue:

@startuml

json "some json" as a {
 "a": 1
}

component b {
}

a ->> b

@enduml

this will work if you replace the arrow from ->> to ->

However, should work with all arrow tips

1 Answer

0 votes
answered Nov 17 by The-Lu (74,900 points)

Hello B.,

Thanks for the report,

FYI that is now fixed and implemented on v1.2024.8:

- Thanks PlantUML team for your work.

For 1./

Here is the current working example:

@startuml
json someJson [1, 2, 3]
@enduml

Or

@startuml
json someJson {
  [1, 2, 3]
}
@enduml

See:

For 2./

That is now fixed.

@startuml
json "some json" {
"a": 1
}
@enduml

Ref.:

Regards,
Th.
...