Serializes a Object into a JSON data stream, iterating recursively over each property.
If gobject implements the Serializable interface, it will be asked to
serialize all its properties; otherwise, the default implementation will be use to translate the compatible types into JSON native types.
| gobject | a Object |
| length | return value for the length of the buffer, or null
|
| a JSON data stream representing the passed Object |