public JSON.with_object (Object object, bool convert_underlines = false, bool pretty = false) throws Error

Create a Json view, serializing the provided GObject instance.

A target GObject must either contain simple properties, or implement the Serializable interface to describe to json-glib how to convert that object. Since it will use glib property names, note that the "_" character will be replaced with "-".


object GObject to serialize.
pretty Default false. When true, outputs in formatted, indented JSON.