# Ideal way to display objects on a screen

**URL:** <https://forum.inductiveautomation.com/t/ideal-way-to-display-objects-on-a-screen/41575>\
**Category:** Ignition\
**Tags:** perspective\
**Created:** [December 16, 2020, 5:17pm UTC](https://forum.inductiveautomation.com/t/ideal-way-to-display-objects-on-a-screen/41575 "2020-12-16T17:17:37Z")\
**Posts on this page:** 1\
**Showing post:** 9

<div class="post-metadata">

**Author:** ![paul-griffith](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/paul-griffith/32/37249_2.png) [@paul-griffith](https://forum.inductiveautomation.com/u/paul-griffith)\
**Post date:** [December 16, 2020, 7:30pm UTC](https://forum.inductiveautomation.com/t/ideal-way-to-display-objects-on-a-screen/41575/9 "2020-12-16T19:30:23Z")

</div>

For something you can use in a script transform (though you should probably put this into a project scoped script). Also, make sure you only attempt to use it from Perspective contexts:

````python
	from com.inductiveautomation.ignition.common import TypeUtilities
	from com.inductiveautomation.perspective.common import PerspectiveModule
	
	gson = PerspectiveModule.createPerspectiveCompatibleGson()
	json = TypeUtilities.pyToGson(value, gson)
	
	return "```\n{}\n```".format(gson.toJson(json))

````

![image](https://us1.discourse-cdn.com/inductiveautomation/original/3X/7/a/7addb5ba9e8ed61bd5b35bab5622ae0d589ac4f6.png)

The triple backtick surrounds are to tell the Markdown component that it’s preformatted text, and thus to preserve line breaks and render with a monospaced font - just like code blocks on the forum.

---

_[View the full topic](https://forum.inductiveautomation.com/t/ideal-way-to-display-objects-on-a-screen/41575)._
