Allow constructing a Json from any object that has a free to_json(t) function.