I was reading instruction document of extension builder and had not found any JSON example. Just for experiment configuration was on a json which the js was fetching using the api.
{
"actionOne": $actionTwo$,
"actionTwo": $actionTwo$
}
for Boolean true false or others will the above method work Pablo? because I think it will throw a syntax error. I mean is JSON variables supported with the way extension builder works because I am not sure.
Extension builder JSON variables
Forum rules
This forum section can be used to submit suggestions for Extension Builder.
Note that this section is not monitored for support.
This forum section can be used to submit suggestions for Extension Builder.
Note that this section is not monitored for support.
-
-
- Posts: 1440
- Joined: Fri Aug 21, 2020 8:27 am
- Contact:
Re: Extension builder JSON variables
I think this should work. Did you try?
-
-
- Posts: 1440
- Joined: Fri Aug 21, 2020 8:27 am
- Contact:
Re: Extension builder JSON variables
Was testing got something like this
Code: Select all
{
"animationEnabled": $animationEnabled$
}
Error fetching the configuration: SyntaxError: Unexpected token '$', ..."Enabled": $animation"... is not valid JSON
-
-
- Posts: 1440
- Joined: Fri Aug 21, 2020 8:27 am
- Contact:
Re: Extension builder JSON variables
Oh figured it out pablo it had to be a string "$variable$" it works
Update: One thing I noticed is that when I was writing name for the property the name was being taken as the variable. In terms of css it was very useful in terms of JavaScript I had to delete the variable after writing it again Maybe we could have a checkbox so if enabled it will automatically take the value from name and if unchecked it will let us write freely Because Names are names can have space and others, but variables have a specific way of writing. What do you think pablo.
For example, Name: Enable Animation
the way it is now doing in extension builder is automatically making it like $enableanimation$ which should correctly be $enableAnimation$ as written in script.
Update: One thing I noticed is that when I was writing name for the property the name was being taken as the variable. In terms of css it was very useful in terms of JavaScript I had to delete the variable after writing it again Maybe we could have a checkbox so if enabled it will automatically take the value from name and if unchecked it will let us write freely Because Names are names can have space and others, but variables have a specific way of writing. What do you think pablo.
For example, Name: Enable Animation
the way it is now doing in extension builder is automatically making it like $enableanimation$ which should correctly be $enableAnimation$ as written in script.