to_json() can output pretty JSON

Now it is possible to write:

    to_json({ a => 1 }, pretty => TRUE);