++ Automatic json encoding for PUT and POST