Hey All,
Quick question regarding json data loading.
I'm working with PlantUML VSCode extension(I'haven't modified any setting except PlantUML server configuration in VSCode so it will use PlantUML Server docker to render my diagrams.
I reviewed the documentation regarding JSON pre-processing.
And tried to load some json data into my existing puml file.
@startuml testing-json-load-data
title Testing Json Preprocessing
!$foo= %load_json(data.json)
!$bar = {"name": "ALICE"}
participant alice as "Alice"
participant bob as "Bob"
alice ->> bob ++: "Hello!"
bob -->> alice --: "Hey Alice! $foo.name"
alice -> bob : "$foo"
@enduml
I'm not able to view the contents of the data.json file, which is:
{"name": "Alice, "age": 42} instead I'm getting an empty object.
The json file itself is placed on the same directory with my-test.puml file.
My question is simple: what am I doing wrong? What are the things that I can check to resolve this issue?
Sorry if it's a newbie question, I wasn't able to find any good documentation on this.
Thanks a lot in advance.