Is there any intentional limit to the number of lines in a JSON variable definition?

0 votes
asked 3 days ago in Question / help by anonymous

trying to define a JSON variable in oder to provide data to the pre-processing, I hit some unexpeted behavior,  whenever the totla count of lines in the definition exceeds 100.

Example:

@startuml
title test
!$JsonData = {
 "1":"line 1",
 "2":"line 2" }
@enduml

works as expected ... until I have 101 lines in there. Actually, defining the same data on a single line will also work as expected -displaying nothing . 

However, if there are more than 100 lines, using PlantUML 1.2021.5 I get the same output as if just putting

 

@startuml
title test
 "101":"line 101" }
@enduml

... effectively leading to errors, as soon as any actual diagram definition ist following. 
Seems the parser works only for 100 lines - is there a reason for that?

 Thanks in advance and best regards
 

1 Answer

0 votes
answered 3 days ago by The-Lu (21,320 points)

Hello A., and PlantUML team,

It seems that is the same issue here: 


After some search on the code, It seems there is a constraint:

for (int i = 0; i < 100; i++)

See: Line 79 of CodeIteratorAffectation.java
 

@PlantUML team:

Regards,
Th.

commented 2 days ago by anonymous

@The-Lu Thanks for the quick clarification! yes

@PlantUML Team I do support both requests smiley

...