Use the type object for sending JSON to the database