%load_json not working where root is array

+1 vote
asked Sep 1, 2022 in Bug by Tony Daly

Json data loaded using %load_json doesn't work if the root is an array rather than an object.

{"fruit":["apple","pear","banana"]} is OK
["apple","pear","banana"] is not OK



.

commented Sep 1, 2022 by The-Lu (63,920 points)

Yes, that is a defect.

See similar issue here, without `%load_json` by just with json element:

CodeOutput
@startjson
[1, 2, 3]
@endjson
@startuml
json JSON {
[1, 2, 3]
}
@enduml

[Rmk from:

].

Your answer

Your name to display (optional):
Privacy: Your email address will only be used for sending these notifications.
Anti-spam verification:

[Antispam2 Feature: please please wait 1 or 2 minutes (this message will disappear) before pressing the button otherwise it will fail](--------)
To avoid this verification in future, please log in or register.
...