Forum Discussion
Hmmm, good question. From what I can tell there doesn't seem to be. I'd suggest submitting this idea to our idea exchange:
http://lithosphere.lithium.com/t5/customer-ideas/idb-p/Lithium_Ideas
In the mean time, you could always use FreeMarker to construct your own similar JavaScript object. Note that this code snippet is untested, and just an idea to get you going in the right direction:
MyCommunityJsonObject = {
"User" : {
"login" : "${user.login?json_string}"
},
"Community" : {
"id" : "${community.id?json_string}",
"title" : "${community.title?json_string}",
"shortTitle" : "${community.shortTitle?json_string}"
},
...
};
Hi Adam,
Thanks for your feedback.
I will submit an idea.
Thank you also for the suggestion about building my own JSON object.
I noticed that you have added a json_string parameter to every method call but I do not see any reference to this in the TKB articles dedicated to context objects.
Do you have further informations about this ?
Clement
- AdamN13 years agoKhoros Alumni (Retired)
"json_string" is a FreeMarker built-in actually:
http://freemarker.sourceforge.net/docs/ref_builtins_string.html#ref_builtin_json_string
It's used to escape the value so that it's safe to insert into the code.
Sign in to react to this post- ChiaraS13 years agoLithium Alumni (Retired)
Hi,
the LITHIUM.CommunityJsonObject is available on mobile as well and not limited to desktop. However, it may depend on the specific device supporting Javascript.
Please note that testing the mobile view using the "?device-view=mobile" parameter in the browser will disable Javascript, so the variable will not be available. You will need to either use a mobile device or change the user agent string of the browser (the easiest is test this on safari with the Developer menu).
Hope it helps,
Chiara
Sign in to react to this post- clemlith13 years agoExpert
Hi Chiara,
Thanks for you insight.
I will check this with Safari.
Thanks,
Clement
Sign in to react to this post