I want to add a JSON to a an activity, but I'm getting errors with curly braces.
Here's how it does not work: https://www.plantuml.com/plantuml/uml/SoWkIImgAStDuR9IIaaiILIoKgZcKW02fSoIr5mu3ooIbfcQas8855CgIIqkKIXABIx8pojELGAhgEMgjUPoICrB0Pe50000
Strangely, it I add a \ after the } it works, but now the two braces are on the same line: https://www.plantuml.com/plantuml/uml/SoWkIImgAStDuR9IIaaiILIoKgZcKW02fSoIr5mu3ooIbfcQas8855CgIIqkKIXABIx8pojELGAhg8tXghNcSaZDIm4Q1W00
The only way I could make it work is by adding a \t: https://www.plantuml.com/plantuml/uml/SoWkIImgAStDuR9IIaaiILIoKgZcKW02fSoIr5mu3ooIbfcQas8855CgIIqkKIXABIx8pojELGAhg8qfuQgrvd98pKi1cWO0
But it's ugly and I feel there should be a better way to do it. Am I missing something trivial?
Looks like a parsing bug to me. It doesn't like having "}" as the last character on a line in an activity.I couldn't find anything nicer than your "\t". But another workaround is to use Unicode full-size curly brackets instead:
It is a big deal, between an greedy or lazy analyser.
Then see similar issues here:
And for Unicode workaround, see also here (as for semi-colon, or bracket)
doh, of course; I forgot that the last character of an activity defines its shape, as documented at https://plantuml.com/activity-diagram-beta#7420c7766a064a28. I can see that it is tricky to parse, it would need to backtrack if it hit a syntax error or something.
Maybe it would be easier to fix the following. Where it seems obvious that the <code> enclosure should wait for the </code> end tag in preference to the activity terminator. This might not give the OP the formatting that they want, but it is the kind of thing that the <code> tag is built for.
"field1": "test response"
For <code> issues, see also here: