added producing of json on put and post operations