Homemade JSON based router