JSON sub-diagram within the ction works only for an array JSON

0 votes
asked May 20, 2022 in Bug by RobertN

This works:

@startuml
start
:file f
{{json
[{
    "a":"b"
}]
}}
;
stop
@enduml
while this doesn't:
@startuml
start
:file f
{{json
{
    "a":"b"
}
}}
;
stop
@enduml

2 Answers

0 votes
answered May 20, 2022 by The-Lu (74,900 points)

Hello R.,

Yes it is an issue (perhaps already reported, I don't remember...).
It is due to the curly bracket management, here is a workaround proposal... use YAML wink , as:

@startuml
start
:file f
{{yaml
a:b
}}
;
:test with curly B}
stop
@enduml

If that can help,
Regards,
Th.

commented May 20, 2022 by The-Lu (74,900 points)

I remember and I found, 
See another pseudo-similar issue here:

commented May 25, 2022 by RobertN
Thanks! YAML could be the answer.

BR

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

Hi all,

FYI, with new version, now it does work:

@startuml
start
:file f
{{json
{
    "a":"b"
}
}}
;
stop
@enduml

Regards,
Th.

...